{{ javascript_collection }}

Contains a collection of scripts, including pagination-related information.
This collection is typically created using the javascript_collection Liquid Tag.

Properties

String object_type
Will always either be "javascript_collection" or "javascript_list" (The main difference is that lists do not have limit, start, page, or total_pages properties).
List items
Contains a list of Scripts.
Integer limit
The maximum number of items that may be included in this list of Items.
Integer start
The 1-based index of the first item that may be included in this list of Items (with the given sorting criteria).
Integer page
The 1-based index of the "page" represented by this collection - as determed by the Start and Limit parameters
Integer total_count
The total number of Scripts that match the criteria used to create this list.
Integer total_pages
The total number of "pages" that match the criteria used to create this list - as determined by the TotalCount and Limit parameters.

Use

This collection object may be evaluated as an object and as a list. When iterated through as a list, all of the standard rules for Liquid lists apply, and the objects returned from the list will be javascript objects.

Example:

{% for item in collection %} <p>{{ collection.start | plus:forloop.index0 }}: {{ item.name }} - {{ item.date_created }}</p> {% endfor %}

Which is identical to

{% for item in collection.items %} <p>{{ collection.start | plus:forloop.index0 }}: {{ item.name }} - {{ item.date_created }}</p> {% endfor %}