Active
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2024 at 16:16 UTC
Updated:
2 Jul 2024 at 16:35 UTC
Jump to comment: Most recent
Core has a tendency to add more and more preprocess variables and never remove them.
Identify stale/crufty preprocess variables, and deprecate them in 11.1 for removal in Drupal 12. This should result in:
1. Less runtime code/smaller preprocess
2. Less verbose template documentation.
3. Less encouraging people to use things in templates they'd be better off doing another way.
Comments
Comment #2
andypostComment #3
catch#3458183: Deprecate $variables['teaser'] got committed.
Opened #3458589: Deprecate $variables['page'] for node.html.twig and node_is_page().
I think we also have some node template variables that are documented but no longer exist:
readmore for example was added in 2004
Remove from node.tpl.php on November 7th 2012
But added to node.html.twig on November 3rd 2012.
Additionally these are set by template_preprocess and are not node specific, so can be removed from the docs.
Comment #4
catchComment #5
catch