While working on a complex HTML structure, to facilitate readability of my Twig template, I divided my file onto many partial templates. In most case it's working well, but sometimes you need to use Twig blocks defined in partial templates across many files. But include
will not let you overriding blocks defined in partial template, when extanding the main template.
To solve this, Twig provide the embed
tag, but it took me some times to figure out how to use it. So here a little reminder, with the usecase on embed
's doc.