Partials are markup fragments created to reuse them across different templates. Partials have access to all the data available to the parent template, including inline variables.

You may include a partial inside a template using the @include tag. The tag accepts the relative path to the template file.

The main content goes here

You may include partials from other disks by prefixing the disk name before the template path.


Include conditionally

You may use the @includeIf method to conditionally include partials when a given statement returns true. For example:

@includeIf(post.comments.length, 'partials/comments')

On this page