Rename 'page' render element to 'body', page.html.twig to body.html.twig

Created on 10 November 2014, almost 11 years ago
Updated 14 August 2025, about 16 hours ago

Problem/Motivation

The name 'page' suggests what is being rendered is the entire HTML page. But that's not the case. All that's being rendered are the contents of the <body> tag.

For all intents and purposes, page.html.twig is "the body", and {{ page_top }} and {{ page_bottom }} are a <body> prefix and suffix, respectively.

Then why do we still call it "the page template"? It actually is "the body template". Once you label it this way, all of the surrounding language starts to make much more sense.

Proposed resolution

  1. Rename #type => 'page' to #type => 'body'
  2. Rename page.html.twig to body.html.twig

Remaining tasks

TBD.

User interface changes

None.

API changes

  1. Renamed #type => 'page' to #type => 'body'
  2. Renamed page.html.twig to body.html.twig
πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • DrupalWTF

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

  • Needs beta evaluation

    Since the first beta of Drupal 8 was released, every new 8.0.x issue should have a beta evaluation in the summary, to help clarify whether the 8.0.0 release is a target for that issue.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024