Prints the values of pagination tools as hidden input fields.
Kuvaus
Pagination tools can be implemented with the <form> element with the and action="{CurrentURL}" attributes.method="GET"
Syntaksi
{PaginationFormParameters(
name: string
)}Näkyvyys
This tag is always used in connection with product list tags (e.g. {ProductSet}).
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
name:You can use this attribute to select the list properties that should be printed as hidden
<input>fields in connection with the product list.Allowed values:
- 'keyword': displays the search term, if set
- 'per_page': displays the number of products displayed on one page
- 'sort': displays the sorting criterion
If you want to give multiple values to the attribute, separate them with pipes. E.g. The default value used is name: 'keyword|per_page|sort'
before: / after:With these two attributes, 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 escape characters to the content printed by the tag, making it easier to use the content in JavaScript code or JSON objects.
Sallitut arvot:- true: the attribute adds escape characters before quotation marks
- false: the attribute does nothing
- json: the attribute adds escape characters to the output, allowing the content to be used in JSON markup.
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.'
