{{ javascript }}

javascript Properties

FieldTypeDescription
object_typestring"javascript"
is_validTrue|FalseTrue if this references a javascript or false if the javascript is null
guidguid
nametext_fieldThe unique name of the script. This field is primarily intended for internal use by website administrators to uniquely identify scripts.
pathstring
scriptcode_field
urltext_field
parse_liquidboolean
pre_includestext_field
post_includestext_field
minifyboolean
script_compiledtext_field
valuestringSynonymn for guid
outputhtmlThe default output that the javascript produces when output directly to the template.
output_in_listhtmlThe default output that the javascript produces when output directly to the template as part of a list.

scripts Summary

Contains multiple scripts.

scripts Properties

FieldTypeDescription
object_typestring"scripts"
is_validtrue/falsetrue if this contains at least one javascript
prependedlist of scriptsscripts that will be listed at the beginning of the items list
fetchedlist of scriptsThe primary list of scripts to be included in the items list
appendedlist of scriptsscripts that will be listed at the end of the items list
appended_uniquelist of scriptsscripts that will be listed at the end of the items list, excluding any scripts that are already included in either the prepended or fetched lists
itemslist of scriptsThe full list of scripts in the proper order and uniqueness, including prepended, fetched, and appended scripts
sizenumberThe total number of items in the list of items, including prepended, fetched, and appended scripts
limitnumberThe maximum number of scripts that could have been fetched dynamically from the database
startnumberThe 1-based index of the first javascript that was (or would have been) dynamically fetched from the database
pagenumberThe 1-based index of the first "page" of scripts that could have been fetched dynamically from the database - as determined by the start and limit properties
total_countnumberThe total number of scripts in the database that matched the provided filter parameters when fetching the list of fetched scripts
total_pagesnumberThe total number of "pages" of results that matched the provided filter parameters when fetching the list of fetched scripts - as determined by the total_count and limit properties
outputhtmlThe default output that the scripts will produce when it is output directly to the template - using the "output_in_list" property of each javascript in the items list

Methods

{% javascript %}

Fetch a single javascript.

{% javascript
[var|set|assign] new_variable_name
Specify a variable name in order to save the javascript to a variable. If not specified the javascript will be output to the template instead. The variable will be saved using the "var" behavior unless "set" or "assign" are specified.
output_to_template
If included, the javascript will be output directly to the template.
=
javascript|guid|string
%}