Skip to content

Paginate ​

Last updated View as Markdown

Information about the pages inside a set of paginate tags.

Properties ​

NameTypeDescription
current_pagenumberCurrent page, starting at 1
current_offsetnumberNumber of items before the current page
itemsnumberTotal number of items in the list
page_sizenumberNumber of items per page
pagesnumberNumber of pages
page_paramstringQuery parameter that selects the page: page, or page[<id>] in the deprecated form
previouspartLink to the previous page, nil on the first page
nextpartLink to the next page, nil on the last page
partsarray of partsLinks for page navigation, with … for skipped pages

A part has a title, a url and is_link. is_link is false for the current page and for ….

Deprecated form ​

The deprecated paginate form sets the paginate object and these variables:

NameTypeDescription
previous_pagestringURL of the previous page
next_pagestringURL of the next page
currentnumberCurrent page
totalnumberTotal items
lastnumberLast page
has_morebooleanWhether there are more pages
itemsarray of productsItems of the current page