Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Task
Use Twig instead of PHPTemplate
To test this code:
Apply patch, set default theme to Stark, clear cache if necessary, click around to make sure theme still works.
Related
#1938864: [meta] Update all core themes to use Twig
#1757550: [Meta] Convert core theme functions to Twig templates
Comment | File | Size | Author |
---|---|---|---|
#2 | core-stark-engine-1938854-1.patch | 388 bytes | TommyK |
Comments
Comment #1
star-szrAdding novice tag, we just need a one-line patch that adds
engine: twig
to stark.info.yml. Great task for someone new to git or contributing to Drupal :)Comment #2
TommyK CreditAttribution: TommyK commentedI added
engine: twig
after thecore: 8.x
line like D6 themes had.Comment #3
chrisjlee CreditAttribution: chrisjlee commented@Cottser: Does this particular task need a test written?
Comment #4
star-szrThanks @TommyK, that's perfect!
@chrisjlee - No, the patch in #2 is all we need in this issue. We don't need Stark-specific tests, and we already have Twig tests in core.
Comment #5
nikkubhai CreditAttribution: nikkubhai commented#2: core-stark-engine-1938854-1.patch queued for re-testing.
Comment #5.0
nikkubhai CreditAttribution: nikkubhai commentedAdd core themes meta
Comment #6
star-szrAs it turns out we're changing the default theme engine in #1806478: Make twig the default engine once all modules templates are converted from .tpl.php to .html.twig which will be a part of the big conversion patch at #1987510: [meta] Convert all core *.tpl.php templates to Twig as singular patch, so closing this one. Thanks everyone!
Edit: to be clear this line won't need to change, that's why I'm closing this one :)
Comment #6.0
star-szrUpdated issue summary.