Stylesheet

Stylesheet

{{ stylesheet }}

Name Type Description
object_type String Will always be datastore_item
is_valid Boolean True if this references a published stylesheet
guid String The unique identifier for this stylesheet
value String Contains the same value as guid
name text The name of the stylesheet which, when combined together with the path, uniquely identifies the stylesheet on this site
path String The path, exluding filename, of this stylesheet used for organizational and reference purposes
stylesheet_type select Stylesheet language. May either be "css", "less", or "scss"
compiled Boolean If true, indicates that this is a top-level stylesheet that should be compiled
parse_liquid Boolean If true, indicates that this stylesheet contains Liquid Markup that should be rendered before the stylesheet is processed and output
url String The full URL for this stylesheet in the CDN
style_sheet_text code The source code for this stylesheet
style_sheet_text_compiled String The full processed and compiled stylesheet text if this is a compiled stylesheet
field_id String The identifier for this field
label String The label for this field
output String Adds the stylesheet to the document head, similar to calling {% add_stylesheet %} with it

{{ stylesheets }}

Contains multiple stylesheets.

Name Type Description
output String The default output that the stylesheets will produce when it is output directly to the template - using the "output_in_list" property of each stylesheet in the items list

{% stylesheet %}

{% stylesheet
var|set|assign
 
Optional. Specify either "var", "set" or "assign" to change which scope this stylesheet is stored on. "var" is the default behavior.
variable_name
 
Specify a variable name in order to save this stylesheet to a variable. If not specified, it will be output to the template instead.
output_to_template
 
If included the stylesheet will be output directly to the template.
=
%}

{% stylesheets %}

{% stylesheets
var|set|assign
 
Optional. Specify either "var", "set" or "assign" to change which scope this stylesheets is stored on. "var" is the default behavior.
variable_name
 
Specify a variable name in order to save this stylesheets to a variable. If not specified, it will be output to the template instead.
output_to_template
 
If included the stylesheets will be output directly to the template.
=
prepend:value
 
Prepend the specified stylesheets before the fetched results. All prepended input will be returned in the same order that it is input. Value may one or more stylesheets, a guid, or a string.
append:value
 
Append the specified stylesheets after the fetched results. All appended input will be returned in the same order that it is input. Value may one or more stylesheets, a guid, or a string.
exclude:value
 
Prevent the specified stylesheets from being included in the fetched results. Has no affect on prepended and appended items. Value may one or more stylesheets, a guid, or a string.
exclude_prepended:true
 
Specifically exclude all prepended stylesheets from the fetched results. If "unique:true" is specified this is the default behavior, although you may also specify "exclude_prepended:false" to allow any prepended items to be fetched along with other results anyway.
exclude_appended:true
 
Specifically exclude all appended stylesheets from the fetched results. This is false by default - even if "unique:true" is specified - so that results are returned in the proper order.
unique:true
 
If set to true, each of the resulting lists (prepended, fetched, appended, and items) will be unique, although there may be duplicates between the prepended, fetched, and appended lists. The "items" list will include objects in the order in which they appear - with prepended items first, then fetched items, then appended items.
max_size:number
 
If specified, then the "items" list will only include up to the specified number of stylesheets. The "limit" may be automatically lowered to only fetch the maximum number of articles that will be included in "items" following prepended items. Note that this may also impact both the "page" and "total_pages" values. In order to use pagination with a list loaded using "max_size" use "start" instead of "page" and "limit".
%}

{% add_stylesheet %}

Add a stylesheet asset to the head of the current page via a <link> tag

{% add_stylesheet inline %}

Outputs an inline stylesheet in a <style> tag.

{% include %}

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.

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'.