Twig is in core - but this is our current TODO list for the Drupal 8 theme layer improvements

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

Much of the information below is now outdated.

Please see http://drupaltwig.org for an updated view of what we're working on and where you can jump in!

https://drupal.org/node/2008464 is another great resource for getting involved with Twig in Drupal 8.


Hi everyone!

Do you want to get involved in Drupal's move to Twig? There are still a lot of areas where we need help, the most important ones are outlined below. Please take a look at these things we need help with, and jump in where you feel most comfortable.

If you need help, there are usually folks in the #drupal-twig IRC channel who can point you in the right direction.

Sprint on these tasks:

Convert theme functions to Twig templates: https://drupal.org/node/1757550

Things we need to have done:

  • Create patches that convert from theme_x() functions to Twig templates
  • Profile patches
  • Review patches
  • Manual testing
  • Re-roll patches

Markup cleanup https://drupal.org/node/1980004

Things we need to have done:

  • Create issues with markup suggestions (but no patches)
  • Debate markup suggestions (still no patches)
  • Create patches based on markup suggestions
  • Review patches
  • Re-roll patches

Remove calls to theme() https://drupal.org/node/2006152

Things we need to have done:

  • Create patches that remove calls to theme() and replace with renderables
  • Review patches
  • Re-roll patches

Consolidate templates wherever possible: http://drupal.org/node/1804614

Things we need to have done:

  • Create patches to remove / replace similar or duplicate theme functions
  • Review patches
  • Re-roll patches

Convert form tables to #type table: https://drupal.org/node/1876712

Things we need to have done:

  • Create patches that remove replace tables with renderables
  • Review patches
  • Re-roll patches

Priority Issues (but these are harder)

Still very important

Issue Queue searches

Comments

Is there a sample of anything

alexrayu's picture

Is there a sample of anything in core already using twig?

Almost

Files now named foo.html.twig

jenlampton's picture

That's actually a bad example, we aren't even naming our twig templates that way anymore. Check the code as currently in Drupal core, for the latest usage.

Convert Core Templates to Twig

steveoliver's picture

Alex-

Not yet. After working in the Twig sandbox, we're beginning to file issues against core now (see [meta] Convert core templates to Twig).

Ok I found some issues and

alexrayu's picture

Ok I found some issues and committed some small patches. Will now make a pause and see if that was all right. The #drupal-twig rooms at irc seems to be off. I am having an Twig_Error_Syntax: The function "theme" does not exist in "core/themes/stark/templates/theme.inc/table.html.twig" at line 72 in Twig_Node_Expression_Function->compile() (line 28 of E:\wamp\www\drupal_8_twig_sandbox\core\vendor\twig\twig\lib\Twig\Node\Expression\Function.php). and currently can't get hold on anybody for clarification. Will need to connect somehow.

IRC

jenlampton's picture

Here are some instructions for joining IRC. We are in there 24-7, so please join us and ask there :)

Theme development

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: