base.html.twig
{% block css %}
{% endblock %}
{% block html %}
{% endblock %}
base.email.html.twig
{% extends 'base.html.twig' %}
{% block css %}
<style>body { font-size: 11pt; }</style>
{% endblock %}
{% block html %}
{% if true %}
{% embed 'confirmation.html.twig' %}
{% endembed %}
{% block baseoverride %}
BASE
{% endblock %}
{% endif %}
{% endblock %}
confirmation.html.twig
{% block suboverride %}
SUBCONFIRM
{% endblock %}
reconfirmation.html.twig
{% extends 'base.email.html.twig' %}
{% block suboverride %}
OVERRIDECONFIRM
{% endblock %}
{% block baseoverride %}
SUB
{% endblock %}
The output is:
<style>body { font-size: 11pt; }</style>
CONFIRM
SUB
The baseoverride block defined in the template extended from is overridden, but the suboverride block in the template embedded by the base template is not. How would I go about overriding that block?
The output is:
The
baseoverrideblock defined in the template extended from is overridden, but thesuboverrideblock in the template embedded by the base template is not. How would I go about overriding that block?