Output a section of template that was captured with a Section Tag.


Here’s an example template:

<h1>{{ title }}</h1>
    {{ content }}

{{ section:sidebar }}
    Some sidebar stuff!
{{ /section:sidebar }}

and here’s an example layout:


        {{ template_content }}

        {{ yield:sidebar }}

Everything within the section:sidebar tag pair will not be rendered in template_content. Instead, it will be rendered by the {{ yield:sidebar }} tag.

Fallback content

If a section has not been created, the yield tag may contain fallback content by using a tag pair.

In the example above, let’s assume that there was no {{ section:sidebar }} used in the template.

    {{ yield:sidebar }}
        This text will be shown since section:sidebar was never used!
    {{ /yield:sidebar }}
Last modified on September 21, 2016