Snippet

Snippet

{{ snippet }}

Name Type Description
object_type String Will always be datastore_item
is_valid Boolean True if this references a published snippet
guid String The unique identifier for this snippet
value String Contains the same value as guid
name text The unique name of the snippet. This property is primarily intended for internal use by website administrators to uniquely identify snippets
folder_guid String The unique identifier of the related folder
folder folder Reference to the related folder object
content_html html The HTML content for the snippet
tags tags The list of tags associated with this snippet
search_entity_guid String The unique identifier for the entity that search results should be directed to
search_entity entity The entity that search results should be directed to
field_id String The identifier for this field
label String The label for this field
output String Identical to using {{ snippet.content_html.value }}

{{ snippets }}

Contains multiple snippets.

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

{% snippet %}

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

{% snippets %}

{% snippets
var|set|assign
 
Optional. Specify either "var", "set" or "assign" to change which scope this snippets is stored on. "var" is the default behavior.
variable_name
 
Specify a variable name in order to save this snippets to a variable. If not specified, it will be output to the template instead.
output_to_template
 
If included the snippets will be output directly to the template.
=
prepend:value
 
Prepend the specified snippets before the fetched results. All prepended input will be returned in the same order that it is input. Value may one or more snippets, a guid, or a string.
append:value
 
Append the specified snippets after the fetched results. All appended input will be returned in the same order that it is input. Value may one or more snippets, a guid, or a string.
exclude:value
 
Prevent the specified snippets from being included in the fetched results. Has no affect on prepended and appended items. Value may one or more snippets, a guid, or a string.
exclude_prepended:true
 
Specifically exclude all prepended snippets 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 snippets 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 snippets. 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".
%}