Embeded layouts
#How to include one Layout code into another layout
Layout tag example:
{{ document.layout(LayoutName}}
#How it works
The Included layout code and parent layout code will be processed as a single layout.
Works as the "include" method in other computer languages.
This helps to structure layouts.
The
{{ document.layout(LayoutName}}tag takes all the text/code/markup that exists in the specified layout and copies it into the parent layout that uses the "layout" tag.
Including layouts is very useful when, for example, you want to insert the same Javascript, HTML, or text to multiple pages of a website.
It works recursively.