Processes and outputs a partial template, javascript, or stylesheet. If the partial template is a compiled template, then any custom fields from the partial template will be available in the parent template as well.
{% include [template|javascript|stylesheet]? variable =? attributes? %}
This method creates a new liquid context for storing and manipulating variables.
The path is significant when including objects. Every template, javascript, and stylesheet has a path, even if that is the "root path" (/). The location of the path to be included will always be based off of the path of the current object. So including 'header' from a template at the path '/pages' will attempt to process '/pages/header' while the same include from a template at the root path - which would attempt to process '/header'. You always have the option of using an "absolute path" when including templates by beginning your included template name with '/'. Eg: {% include '/header' %} or {% include '/partials/header' %}. Absolute paths ignore the path of the current template when determining what partial to include. You can also navigate up the directory structure using '../'. So including '../partials/header' from a template at the path '/agency/pages' will attempt to process '/agency/partials/header'.
{% gallery %}
{% articles %}
{% stylesheet output_to_template? [[var, set, or assign]? variable]? output_to_template? = value %}
Fetches a single stylesheet.
{{ stylesheets }}
{{ stylesheet }}
{% stylesheets %}
{% stylesheets output_to_template? [[var, set, or assign]? variable]? output_to_template? = arguments %}
arguments
Fetches a list of stylesheets.
{{ stylesheets }}
{{ stylesheet }}
{% stylesheet %}
Add a stylesheet asset to the head of the current page via a <link> tag
{% add_stylesheet value attributes %}
attributes
{% add_javascript %}
{% add_javascript inline %}
{% add_stylesheet inline %}
Outputs an inline stylesheet in a <style> tag.
{% add_stylesheet inline [uniquename] [= attributes]? %}
attributes
{% end_stylesheet %}
This method creates a new liquid context for storing and manipulating variables.
{% add_stylesheet %}
{% add_javascript %}
{% add_javascript inline %}
Demonstrates how to add Stylesheet.
Add Stylesheet
CopyDemonstrates how to add inline stylesheet.
Add inline stylesheet
CopyDemonstrates how to include template and pass variables.
Include template and pass variables
Copy