customer_account:template_manager:template_manager_variables:paginator_variables

customer_account:template_manager:template_manager_variables:paginator_variables

If you want to “upgrade” or customize your paginator, FINDOLOGIC offers you following variables to do so:

Variable Type Brief description
SHOW_FROM integer Number of the first item displayed, 1-based
SHOW_TO integer Number of the last item displayed, 1-based
TOTAL_PAGES integer total number of pages (incl. the current one)
CURRENT_PAGE integer Number of the current page, 1-based
PREVIOUS_PAGES array Array of pages before the current page
PREVIOUS_PAGE array Contains information about the previous page, if selected page > 1
NEXT_PAGES array Array of pages after the current page
NEXT_PAGE array Contains information about the next page, if selected page < last page

Item in the PREVIOUS_PAGES array / PREVIOUS_PAGE

Variable Type Brief description
ITEM.NAME string Name of the page
ITEM.URL string URL to the search results, with the page selected

Item in the NEXT_PAGES array / NEXT_PAGE

This array has the same structure as the PREVIOUS_PAGES array.

Code example

Here is a small code example that generates a paginator with arrows.

{if $PREVIOUS_PAGE.URL}
    <a href="?{$PREVIOUS_PAGE.URL}">Back</a>
{/if}
{foreach from=$PREVIOUS_PAGES key=i item=page name=pages}
    <a href="?{$page.URL}" class="flPagePrevious">{$page.NAME}</a>
{/foreach}
<span class="flPageCurrent">{$CURRENT_PAGE}</span>
{foreach from=$NEXT_PAGES key=i item=page name=pages}
    <a href="?{$page.URL}" class="flPageNext">{$page.NAME}</a>
{/foreach}
{if $NEXT_PAGE.URL}
    <a href="?{$NEXT_PAGE.URL}">Next</a>
{/if}