Prints a drop-down menu for selecting the number of products that should be displayed on a single list page.

Kuvaus

The values available in the drop-down menu depend on whether or not the product list uses product filters:
  • If product filters are enabled, the menu options are determined based on the theme's theme.xml settings file.
  • If product filters are not in use, the menu options are determined by the limit attribute of the product list tag.

Pagination tools can be implemented with the <form> element with the action="{CurrentURL}" and method="GET" attributes.

Read more about implementing pagination tools on product lists.

Syntaksi

{PaginationLimit}

Näkyvyys

Toimii näkyvyydessä: tuote

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

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