Pages variables
All methods
Use any of these methods with page collections in your templates.
- .ByDate
- Returns the given page collection sorted by date in ascending order.
- .ByExpiryDate
- Returns the given page collection sorted by expiration date in ascending order.
- .ByLanguage
- Returns the given page collection sorted by language in ascending order.
- .ByLastmod
- Returns the given page collection sorted by last modification date in ascending order.
- .ByLength
- Returns the given page collection sorted by content length in ascending order.
- .ByLinkTitle
- Returns the given page collection sorted by link title in ascending order, falling back to title if link title is not defined.
- .ByParam
- Returns the given page collection sorted by the given parameter in ascending order.
- .ByPublishDate
- Returns the given page collection sorted by publish date in ascending order.
- .ByTitle
- Returns the given page collection sorted by title in ascending order.
- .ByWeight
- Returns the given page collection sorted by weight in ascending order.
- .GroupBy
- Returns the given page collection grouped by the given field in ascending order.
- .GroupByDate
- Returns the given page collection grouped by date in descending order.
- .GroupByExpiryDate
- Returns the given page collection grouped by expiration date in descending order.
- .GroupByLastmod
- Returns the given page collection grouped by last modification date in descending order.
- .GroupByParam
- Returns the given page collection grouped by the given parameter in ascending order.
- .GroupByParamDate
- Returns the given page collection grouped by the given date parameter in descending order.
- .GroupByPublishDate
- Returns the given page collection grouped by publish date in descending order.
- .Len
- Returns the number of pages in the given page collection.
- .Limit
- Returns the first N pages from the given page collection.
- .Next
- Returns the next page in a local page collection, relative to the given page.
- .Prev
- Returns the previous page in a local page collection, relative to the given page.
- Returns a collection of pages related to the given page.
- .Reverse
- Returns the given page collection in reverse order.
Sort by
Use these methods to sort page collections.
- .ByDate
- Returns the given page collection sorted by date in ascending order.
- .ByExpiryDate
- Returns the given page collection sorted by expiration date in ascending order.
- .ByLanguage
- Returns the given page collection sorted by language in ascending order.
- .ByLastmod
- Returns the given page collection sorted by last modification date in ascending order.
- .ByLength
- Returns the given page collection sorted by content length in ascending order.
- .ByLinkTitle
- Returns the given page collection sorted by link title in ascending order, falling back to title if link title is not defined.
- .ByParam
- Returns the given page collection sorted by the given parameter in ascending order.
- .ByPublishDate
- Returns the given page collection sorted by publish date in ascending order.
- .ByTitle
- Returns the given page collection sorted by title in ascending order.
- .ByWeight
- Returns the given page collection sorted by weight in ascending order.
- .Reverse
- Returns the given page collection in reverse order.
Group by
Use these methods to group page collections.
- .GroupBy
- Returns the given page collection grouped by the given field in ascending order.
- .GroupByDate
- Returns the given page collection grouped by date in descending order.
- .GroupByExpiryDate
- Returns the given page collection grouped by expiration date in descending order.
- .GroupByLastmod
- Returns the given page collection grouped by last modification date in descending order.
- .GroupByParam
- Returns the given page collection grouped by the given parameter in ascending order.
- .GroupByParamDate
- Returns the given page collection grouped by the given date parameter in descending order.
- .GroupByPublishDate
- Returns the given page collection grouped by publish date in descending order.
- .Reverse
- Returns the given page collection in reverse order.
Navigation
Use these methods to create navigation links between pages.