Prints the values of pagination tools as hidden input fields.

Kuvaus

The pagination tools are implemented as a <form> element, which is assigned the attributes action="{CurrentURL}" and method="GET".

Syntaksi

{PaginationFormParameters( name: string )}

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

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 the before and after 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 before and after attributes 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.'