Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Combining template overriding with inheritance #17407

Copy link
Copy link
Closed
@Guite

Description

@Guite
Issue body actions

It would be great to have a functionality which allows to remove uncustomised Twig blocks from a template override. All blocks existing in the override template should be used from there, while the remaining ones should be used from the original template in the bundle.

This would further simplify customisation as you could do something like this.

Bundle template:

{% block content %}
    {# ... #}
    {{ block('additions') }}
{% endblock %}
{# ... #}
{% block additions %}{% endblock %}

Override:

{% block additions 'My addition' %}

So you do not need to copy whole templates anymore, but can just focus on what you need to change. This reduces maintaining the customised templates, too.

A similar functionality does already exist for translations where only a subset of all messages can be added to an override.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.