Prints a drop-down menu with the product list's sorting criteria.

Description

The values in the drop-down menu are defined in the product list's sort attribute.

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.

Syntax

{PaginationSort(
    id: string
)}

Scope

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'
)}

Pagination tools are implemented as a form with the relevant page's address as its action attribute.

First, the pagination status is printed (which page the user is currently visiting) by using the {PaginationStatus} tag.

Next, pagination parameters, i.e. ... , are printed by using the {PaginationFormParameters} tag.

The menus for sorting and filtering the product list are printed by using the {PaginationSort} and {PaginationLimit} tags. The values available in the menus are based on the sort and limit attributes' values.

Attribuutit

id:

Defines the id attribute of the <select> list to be printed and the for attribute of the list's <label> element.

Allowed values:string

after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:The HTML and Interface markup

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

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:The HTML and Interface markup

E.g. or:'Sisältöä ei löytynyt.'