{% blog_post_collection %}

Fetch a collection of Blog Posts that match the given criteria and either assign it to a variable, output it to the template, or both.
Syntax: {% blog_post_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 blog_post to or "output_to_template". You MAY include both, in which case the variable name should precede "output_to_template".


Tag|Guid|String tag
The tag to filter by - may evaluate to any of a tag object, a tag guid, or a tag name.
Author|Guid|String author
The author to filter by - may evaluate to any of an author object, an author guid, or an author name.
Folder|Guid|String folder
The folder to filter by - may evaluate to any of a folder object, a folder guid, or a folder name.
String filter
Filter results to only return Blog Posts which match the filter.
blog|Guid|string blog
The blog to filter by - may evaluate to any of a blog object, a blog guid, or a blog name.
true/false has_page
Only show objects for which default_page_guid is not null

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 BlogPostCollections the available sort_by options are:

sort_direction options are:


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:

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

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