Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291607

Extend page.html.twig with html.html.twig

$
0
0

Updated: Comment #N

Problem/Motivation

In Drupal 7, a separation between html.tpl.php and page.tpl.php was introduced. This separation seems unneeded and makes it harder to theme Drupal. Merging the files back to how it was before D7 would make theming Drupal sites easier and faster, and it gives the themer more control of the HTML.

Proposed resolution

  • Combine html.html.twig and page.html.twig to page.html.twig
  • Use twig blocks for the maintenance page (and name it page--maintenance-page.twig).
  • Combine template_preprocess_html() and template_preprocess_page() to template_preprocess_page().
  • Update drupal_common_theme() to combine 'html' and 'page' theme settings and re-use the existing page render classes.

Remaining tasks

  • Combine html.html.twig into page.html.twig Twig Templates
  • Combine *_preprocess_html() into *_preprocess_page() and adjust variables for the page.html.twig template
  • Make the pages render correctly
  • Wrap twig blocks around the variable parts of the template, likely head and body blocks?

User interface changes

None

API changes

  • Removes template_preprocess_html().

Original report by @mortendk

Why:
1 themers arent idiots & can understand that "dont remove {{ page_top }} {{ page }} {{ page_bottom }}
if you do this - stuff wont show up- there done

2. Less files makes it easier to figure out wtf is going on

3. if you wanna do variations over the same base fx adding in elements in the html.html.twig file and then have variations with the page.twig files you can do that with "twigblocks" (blogs in twigs)

blockers:
twigblocks must work (they do)


Viewing all articles
Browse latest Browse all 291607

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>