Problem/Motivation
Currently theming in Drupal 8 still entails overriding entire templates. So for example a collection of node templates for different content types will result in a number of templates all repeating the entire contents of the node template even though each one may only be overriding a small portion of the template or adding mark-up in one area.
It has always been this way with Drupal by default, most of the solutions in the past to provide more granular targeting and flexibility have either involved modules that comprehensively change how layout is handled with Drupal (with admin configuration and functionality) or complex base themes.
Proposed resolution
Provide Twig Block mark-up in core templates that allows Twig extends to be used when overriding templates in themes, allowing for much more 'surgical' targeting of changes.
Currently a Twig Block is only used on one place (The block.html.twig template ironically) and only around the content output of this template. Adding a much more comprehensive Twig block markup in Core will allow themers to immediately reap the same advantages that are gained by Core templates that extend block.html.twig.
This issue is really for general discussion and to test the waters (I believe that the advantages adding comprehensive Twig Block mark-up make it worthwhile but there maybe some technical objections and/or other problems that would follow.
For a better idea of what I am suggesting see an experimental base theme I have started work on, there is more information in the readme.
Beta phase evaluation
Issue category | Feature because it is an improvement to the themeing |
---|---|
Issue priority | Normal because it will not resolve errors |