Adjuntar contenido para bloquear desde múltiples subtemplates
Hay varias preguntas sobre cómo agregar un bloque con una ramita. La respuesta siempre es usar la herencia y el uso y luego llamar al padre (). De alguna manera no sé cómo funciona esto en mi caso específico:
base.html.twig
{% block content %}{% endblock %}
{% block appendable %}
{% endblock %}
{% block another_appendable %}
{% endblock %}
site.html.twig
{% extends base.html.twig %}
{% block content %}
{# Here use/include/embed, i dont know #}
{% use sub1.html.twig %}
{% use sub2.html.twig %}
{% endblock content %}
sub1.html.twig
Some content that should be directly rendered
{% block appendable %}
some stuff that should be added to appendable
{% endblock %}
{% block another_appendable %}
This content should be added to "another appendable"
{% endblock %}
sub2.html.twig
{% block appendable %}
additional stuff that should be appended
{% endblock %}
Me gustaría que los contenidos de sub1 y sub2 se rendericen dentro de anexable. ¿Cómo podría lograr eso?