đ§Tags for Includes
Last updated
Last updated
The Liquid tag include
is usually used to insert a Liquid Partial into a Liquid File.
Sometimes this can link to one of your files directly, simply pass in a String containing a custom path to your file. The path must start relative to the partials folder and must not include the file extension:
đŗIncludes File StructureSometimes it will link to a hidden Siteglide Module file, which may in turn include one of your customisable "layout" Liquid files.
To include one of Site's common include types, use these below and pass in the ID of the include (or the filename without the extension which will be the same). Name is a completely optional parameter.
The include tag will always pass down all variables initiated above it to the file that has been included.
These can be either implicit or explicitly passed:
For this example, implicit_variable
and explicit_variable
will have scope inside the partial file when it is rendered, but varible_with_no_scope
will not, simply because it is initialised after the include tag in the page.
There are also alternative tags which have a different inheritance behaviour:
If you want to pass variables from the partial file up to the page, you need to use either of these methods: