twig Template inheritance Change the content of an included template

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

article.twig.html

<article>
    <h1>{{ article.title }}</h1>
    {% block content %}
    <p>{{ article.content }}</p>
    {% endblock %}
</article>

articles.twig.html

{# use default template for article #}
{% for article in articles %}
    {% include "article.twig.html" %}
{% endfor %}

{# use custom template for article #}
{% for article in articles %}
    {% embed "article.twig.html" %}
        {% block content %}
            <img src="{{ article.image }}" alt="{{ article.title }}" />
            {{ parent() }}
        {% endblock %}
    {% endembed %}
{% endfor %}


Got any twig Question?