Drupal Association members fund grants that make connections all over the world.
Now that the Twig engine is in core, we must convert all
existing core *.tpl.php template files and
theme_ functions to use Twig templates. Preprocess functions and hook_theme definitions must also be updated.
DOCS: Coding standards for conversion:
- Watch the Twig screencast for help: http://www.youtube.com/watch?v=HS4yKJjrb2E
- Read more about Twig best practices for preprocess functions and templates in Drupal docs.
See sub-issues below.
Template file conversions: Replace all tpl.php files with .html.twig equivalents Update preprocess functions for the .html.twig versions of .tpl.php templates, to use renderables Benchmark the .html.twig versions of template files to assure they aren't very much slower
Convert theme_* functions to Twig templates. See.
- Replace all theme functions with .html.twig equivalent templates
- Add new preprocess functions for the .html.twig versions of theme functions (if necessary)
- Benchmark the .html.twig versions of theme functions to assure they aren't very much slower
- Update all hook_theme definitions to include
'template' => 'foo',where foo.html.twig is the template being added
Needs manual testing
- theme_system_modules_details() (system.admin.inc):
- theme_system_modules_uninstall() (system.admin.inc):
Needs work (needs Tests)
Needs work (performance tuning)
- picture module:
- menu module:
- theme_test module theme_ functions:
Fixed/closed (roughly reverse chronological)
- theme.maintenance.inc (authorize.php):
- remove theme_more_link
- update module:
- forum module:
- system module meta (@todo add sub-issues here):
- user module theme_ functions:
- seven theme:
- simpletest module:
- image module:
- file module:
- language module:
- field module theme_ functions:
- node module theme_ functions:
- item list
- theme links
- forum topic list
- comment module:
- filter module:
- toolbar module:
- ckeditor module:
- rdf module:
- aggregator module theme_ functions:
- status messages:
- feed icon:
- overlay module theme_ functions:
- options module:
- theme_views_view_field() will be removed in
- shortcut module:
- field_ui module:
- [meta] theme.inc:
- more link
- more help link:
User interface changes
Likely minimal to no API changes.
Possible new theme layer process order:
- Twig Conversion Instructions (All conversions have been moved to the core queue, we would like to have a handbook page on Drupal.org similar to this document to detail converting templates and theme functions to Twig)
- Twig Consolidation Suggestions (after this issue is fixed).
Twig sandbox: http://drupal.org/sandbox/pixelmord/1750250 (all conversions have been moved over from the sandbox and we are working directly in the core queue, the sandbox link is only here for reference).
### These issues were actually blocking progress ###
## This issue will decrease the work we need to do ##
These issues are related to our work, and will block the release of D8
Twig engine issues
- Remove unnecessary preprocessing (no issue yet)
After Commit Issues
- Update preprocess functions for the .html.twig versions of .tpl.php templates - remove unnecessary preprocessing:
Notes for reviewing Twig Patches manually
To find a list of patches that are theoretically good to go but manual testing is holding them back see http://drupal.org/project/issues/search/drupal?text=convert&status%5B%5D....
Generally, you are trying to see if the HTML output has changed from a clean install of Drupal 8 versus a patched install. Many Twig issues have a "To test this code" section in the issue summary that will direct you how to test the patch. If you find that testing the patch using simplytest.me has not produced the results you expected, or only some of the expected output, you will want to test the patch manually.