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

Issue fork bem-3483243

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

timohuisman created an issue. See original summary.

timohuisman’s picture

Status: Active » Needs review
casey’s picture

Status: Needs review » Reviewed & tested by the community

  • timohuisman committed ba030216 on 8.x-3.x
    Issue #3483243 by timohuisman, casey: Add twig variables to easily...
timohuisman’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.