Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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:
- links.html.twig
item-list.html.twigFixed- views-view-list #1843754: Convert views/templates/views-view-list.tpl.php to twig
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 CreditAttribution: thedavidmeister commentedThis so doesn't work for #1939104: Convert theme_html_tag() to Twig.
Comment #3
thedavidmeister CreditAttribution: thedavidmeister commentedtagging
Comment #3.0
thedavidmeister CreditAttribution: 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.