âšī¸Pagination
The Pagination Include
This include was designed to keep SiteBuilder layouts tidy by abstracting common pagination logic out of layouts.
It can be used to determine where in the layout the pagination layout should be displayed. Just move the tag to where you need it.
The include is an alternative to the documented Siteglide feature How to Move Pagination; it just adds a few extra SiteBuilder features.
Important The include will only output pagination if the main Liquid tag has the parameters use_pagination: 'true'
and pagination_layout
set. Otherwise, it will do nothing.
Example
parameters
live_updates
Boolean 'true' or 'false'
optional
This is to be used alongside the live_updates feature. Setting to true will add data-attributes needed to wrap the layout in elements which have both the data-sg-live-update-controls and data-sg-live-update-component attributes. It will also include a hidden field to set per_page
as a default parameter to that inherited from the main tag, as well as hidden fields for defaults for show_pagination
and pagination_layout
.
lock_per_page
Boolean 'true' or 'false'
optional, default is 'true'
This is to be used alongside the live_updates feature and the live_updates
parameter above. Set this to 'false' if you have another control to set per_page
, else, set to 'false' to automatically set per_page to the same value inherited from the module tag.
Versions
V1 - original release
The original logic inside the function is as follows. You can use this to make a copy and modify if you wish in your own layouts.
Last updated