{% page_collection %}

Fetch a collection of Pages that match the given criteria and either assign it to a variable, output it to the template, or both.
Syntax: {% page_collection [new_variable_name] [output_to_template] filter_name:FilterValue start:1 page:1 limit:25 sort_by:"DateCreated" sort_direction:"desc" %}

Note: You MUST include at least one of a variable name to assign the page to or "output_to_template". You MAY include both, in which case the variable name should precede "output_to_template".

Filters

String filter
Filter results to only return Pages which match the filter.
siteDomain|Guid|string site_domain
The site_domain to filter by - may evaluate to any of a site_domain object, a site_domain guid, or a site_domain name.
Marketpath.Base.SSLMode ssl
Filter results to only return Pages for which ssl_mode exactly matches the filter
template|Guid|string template
The template to filter by - may evaluate to any of a template object, a template guid, or a template name.

Sorting Options

All collection tags allow you to specify the field and direction that the results should be sorted by, although the available fields are different for each collection type. For PageCollections the available sort_by options are:

sort_direction options are:

Pagination

All collection tags allow you to specify how many results should be returned, and starting at what number. While there is only one limit field, there are two ways to determine the pagination. The first is to specify the start number (1-based). The second is to specify the page number (also 1-based). Eg:

{% page_collection start:4 %} OR {% page_collection page:2 %}

If both the start and page arguments are present, the page argument will be ignored.