Skip to content

View Helpers

previousPageLink()

previousPageLink() — returns string

Available in: controller Category: Pagination Functions

Creates a link to the previous page, or a disabled span when on the first page.

NameTypeRequiredDefaultDescription
textstringnoPreviousThe text for the link.
handlestringnoqueryThe handle given to the query that the pagination should be displayed for.
namestringnopageThe name of the param that holds the current page number.
classstringnoCSS class for the link element.
disabledClassstringnodisabledCSS class for the disabled span element.
showDisabledbooleannotrueWhether to render a disabled span when on the first page.
pageNumberAsParambooleannotrueDecides whether to link the page number as a param or as part of a route.
encodeanynotrueUse this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to true to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to attributes to only encode attribute values and not tag content.