Prints pagination buttons for product lists.
Kuvaus
Pagination buttons contain the following:
- Next/previous buttons
- Page buttons that enable direct access to the selected page
The number of visible page buttons can be defined by using the items attribute.
The pagination tools are implemented as a <form> element, which is assigned the attributes and action="{CurrentURL}".method="GET"
Syntaksi
{PaginationPages( items: int )}Näkyvyys
This tag is always used in connection with product list tags (e.g. {Products}).
Implementing pagination tools for product lists
In the example below, we discuss the implementation of pagination tools in MyCashflow's default theme.
{Products( pagination: true, classes: 'first||', limit: '30|15|60|90', sort: 'manual|name_asc|released_desc|price_asc', before: ' <form action="{CurrentUrl}" method="get" id="PaginationSortForm"> {PaginationStatus} <div class="FormItem GroupItem"> {PaginationFormParameters( name: 'keyword' )} <div> {PaginationSort} </div> <div> {PaginationLimit} </div> <div> <button type="submit">{%Send}</button </div> </div> </form> ', after: '{PaginationPages(items: 7)}', helper: 'helpers/listproduct' )}The pagination tools are implemented as a form, with the action attribute assigned the address of the current page.
First, the pagination status (which page the user is currently on) is printed using the {PaginationStatus} tag.
After this, the pagination parameters are printed using the {PaginationFormParameters} tag.
The product list sorting and filtering menus are printed using the {PaginationSort} and {PaginationLimit} tags. The values of the menus are determined based on the values of the sort and limit attributes defined in the product list.
Attribuutit
items:Defines the number of page buttons to display. The same number of buttons is displayed in both directions from the selected page.
Allowed values: integers.
Default value: 9. The default value must be equal to or greater than 7.
before/after:With the
beforeandafterattributes, you can define content that is output before or after the content produced by the tag.Allowed values: text that may contain HTML and Interface markup.
E.g.
before:'<p>This markup appears before the tag's own content.</p>'.after:'<p>This appears after the tag's own content.</p>'
If the tag does not produce any content, the content of the
beforeandafterattributes will also not be displayed.escape:Adds an escape character before quotation marks in the output. The attribute makes it easier to process the tag-produced content when using JavaScript.
Allowed values: true/false. The default value is false.
or:Defines alternative content that is displayed if the tag itself does not produce any content.
Allowed values: text that may contain HTML and Interface markup.
E.g.
or:'Content not found.'
