Pagelist
class Pagelist (View source)
A Pagelist object represents a set of Page objects (matching certain criterias).
Methods
Initialize the Pagelist.
Set or change the configuration of the pagelist and return the current configuration as array.
Return the default options array.
Return all tags from all pages in $relevant as array.
The final set of Page objects - filtered.
Calculate the number of pages of the pagination.
Details
at line 180
__construct(array $collection, object $Context)
Initialize the Pagelist.
at line 212
array
config(array $options = array())
Set or change the configuration of the pagelist and return the current configuration as array.
To just get the config, call the method without passing $options.
Options:
- context: an optionally fixed URL for the context of a pagelist of type breadcrumbs or children. In case this parameter is false, within a loop the context always changes dynamically to the current page.
- excludeCurrent: default false
- excludeHidden: default true
- filter: filter pages by tags
- limit: limit the object's array of relevant pages
- match: filter pages by matching one or more key/regex combinations passed as JSON string
- offset: offset the within the array of all relevant pages
- page: false (the current page in the pagination - to be used with the limit parameter)
- search: filter pages by search string
- sort: sorting options string, like "date desc, title asc"
- template: include only pages matching that template
- type: sets the type of pagelist (default is false) - valid types are false (all), "children", "related", "siblings" and "breadcrumbs"
at line 238
array
getDefaults()
Return the default options array.
at line 306
array
getTags()
Return all tags from all pages in $relevant as array.
at line 333
array
getPages(boolean $ignoreLimit = false)
The final set of Page objects - filtered.
Note that $offset & $limit only reduce the output and not the array of relevant pages! Using the getTags() method will still output all tags, even if pages with such tags are not returned due to the limit. Sorting a pagelist will also sort all pages and therefore the set of returned pages might always be different.
at line 378
number
getPaginationCount()
Calculate the number of pages of the pagination.