I just had a look into the blog skeleton which uses antimatter theme. I noticed that some template files uses “extends” and other do use “embed”. For example item.html.twig uses:
{% embed ‘partials/base.html.twig’ %}
…
{% endembed %}
I changed it to:
{% extends ‘partials/base.html.twig’ %}
and couldn’t see any difference. It works as before.
So could anyone tell me whats the difference between those two and when use to which?
I probably was using something before that required embed and then removed it or refactored it. embed is similar to extends but lets do more such as multiple levels of block extending.
Mhh… all right! If I understood correctly I would use extends to include the content/skeleton of my main template base.html.twig into the child template blog.html.twig. If I need to include another child-template inside my blog.html.twig which has some blocks I would like to override then I have to use embed. Is this right? Or