Include, embed

Last modified: 02 januari 2024

You can include and embed other files. The file locations are relative to the working directory.

include just includes a file and by default passes all variables to the include (you can override that behavior, see the example).

embed basically does the same, but allows to override blocks in the embedded file with alternative content.

main.twig:

some_include.twig:

some_embed.twig: