Active
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2012 at 21:33 UTC
Updated:
18 Aug 2025 at 17:41 UTC
Jump to comment: Most recent
All HTML tags should be printed in templates as tags, not as variables. Below are a few templates that are guilty of the variable approach and need to be revisited:
For example:
<{{ heading.level }} class="{{ heading.attributes.class }}"{{ heading.attributes }}>
{{ heading.text }}
</{{ heading.level }}>
needs to be replaced with
<h3 class="{{ heading.attributes.class }}"{{ heading.attributes }}>
{{ heading.text }}
</h3>
Comments
Comment #0.0
jenlamptons
Comment #0.1
jenlamptoncode samples
Comment #0.2
jenlamptoncode tags
Comment #1
jenlamptonMoving this issue to the core queue.
Comment #1.0
jenlamptonadd item-list
Comment #1.1
jenlamptonviews-view-list
Comment #2
thedavidmeister commentedThis so doesn't work for #1939104: Convert theme_html_tag() to Twig.
Comment #3
thedavidmeister commentedtagging
Comment #3.0
thedavidmeister commentedlink
Comment #4
joelpittetI agree with this to some extent but I think it won't make the cut, maybe 8.1.x?
I do recall panels recently going the other direction on this, with a dropdown for the title tag in D7.
Comment #20
smustgrave commentedThank 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!
Comment #21
smustgrave commentedThe links.html.twig file still appears to be liked this. So moving back to active for consideration but summary will need to be updated.