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 %}
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:
Unfortunately, this would override the navigation block no matter the value of the isEmbed variable.
To workaround this I've used: