| Field | Type | Description |
| object_type | string | "javascript" |
| is_valid | True|False | True if this references a javascript or false if the javascript is null |
| guid | guid | |
| name | text_field | The unique name of the script. This field is primarily intended for internal use by website administrators to uniquely identify scripts. |
| path | string | |
| script | code_field | |
| url | text_field | |
| parse_liquid | boolean | |
| pre_includes | text_field | |
| post_includes | text_field | |
| minify | boolean | |
| script_compiled | text_field | |
| value | string | Synonymn for guid |
| output | html | The default output that the javascript produces when output directly to the template. |
| output_in_list | html | The default output that the javascript produces when output directly to the template as part of a list. |
Contains multiple scripts.
| Field | Type | Description |
| object_type | string | "scripts" |
| is_valid | true/false | true if this contains at least one javascript |
| prepended | list of scripts | scripts that will be listed at the beginning of the items list |
| fetched | list of scripts | The primary list of scripts to be included in the items list |
| appended | list of scripts | scripts that will be listed at the end of the items list |
| appended_unique | list of scripts | scripts 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 |
| items | list of scripts | The full list of scripts in the proper order and uniqueness, including prepended, fetched, and appended scripts |
| size | number | The total number of items in the list of items, including prepended, fetched, and appended scripts |
| limit | number | The maximum number of scripts that could have been fetched dynamically from the database |
| start | number | The 1-based index of the first javascript that was (or would have been) dynamically fetched from the database |
| page | number | The 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_count | number | The total number of scripts in the database that matched the provided filter parameters when fetching the list of fetched scripts |
| total_pages | number | The 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 |
| output | html | The 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 |
Fetch a single javascript.
{% javascript[var|set|assign] new_variable_nameSpecify 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_templateIf included, the javascript will be output directly to the template.=javascript|guid|string%}