Postponed
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2016 at 08:51 UTC
Updated:
22 Jul 2025 at 15:36 UTC
Jump to comment: Most recent
All "meta" things are bubbled up from the various parts of the page:
#attached[http_header], #attached[html_head_link]
<meta> => #attached[html_head]
<link> including those to load CSS => #attached[html_head_link], #attached[library], #attached[feed]
<script> => #attached[library]
The one and only exception: <title>.
You can clearly see this is an exception by simply looking at the html.html.twig template:
<head>
<head-placeholder token="{{ placeholder_token|raw }}">
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token|raw }}">
<js-placeholder token="{{ placeholder_token|raw }}">
</head>
Consequently, modules that need to access the page title … can't! They have to render the entire HTML template and then parse the title out. See #2692317-10: Make everything in <head> update: <title>, <meta> tags, etc. for example.
Introduce #attached[title].
Merge algorithm TBD.
Discuss.
None.
TBD
TBD
Comments
Comment #2
wim leersComment #3
wim leersRelated: #2359901: Discourage $main_content['#title'] in favor of route titles and title callbacks.
Comment #4
wim leersComment #5
catchWe could add page title bubbling in a minor release, so moving back.
However, also postponing on #2359901: Discourage $main_content['#title'] in favor of route titles and title callbacks since Merge algorithm TBD. is where we ran into problems last time this came up, and understanding which cases aren't handled might help with that.
Comment #20
smustgrave commentedBlocker still seems to be postponed.