Skip to content

Conditional inheritance #541

Description

@dinamic

For a number of cases we would need to override one or another block. For example, we have a controller which executes in both standalone and in ajax mode. While requested via ajax we would not want to show the navigation.

At first I tried to use the following structure:

{% if isEmbed %}
{% block navigation "" %}
{% endif %}

Unfortunately, this would override the navigation block no matter the value of the isEmbed variable.

To workaround this I've used:

{% block navigation %}
{% if isEmbed != true %}
{{ parent() }}
{% endif %}
{% endblock navigation %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions