Add twig variables to easily override HTML tags

Created on 24 October 2024, 3 months ago

Problem/Motivation

Some templates do use blocks which let you override the content. However, tags that are defined outside the blocks can't be overwritten.

Proposed resolution

Add twig variables for the most common templates to easily override the html tags. For example in field.html.twig;

...
{% set wrapper_tag = wrapper_tag ?: 'div' %}
...
<{{ wrapper_tag }}{{ attributes.addClass(classes) }}>
  {% block content %}
    ...
  {% endblock %}
</{{ wrapper_tag }}>

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands timohuisman Leiden, Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024