Knowledge Base

Pagination

Last Modified:
07 Feb 2022
User Level:
Power User

Description

Using the Pagination Navigation Object you can specify the number of Content Items from a Branch or Section that is output to a page. The rest of the content is output, in batches of the same size, to new folders under the root which correspond to the page number. These links are visible at the bottom of the page, allowing the visitor to move through the pages. This is useful when creating paginated listings of content (e.g. News or Events).

The other types of Navigation Objects that provide paginated content (with different types of logic and options to search for the content) are:

How to create a Pagination object

Using multiple Pagination Navigation Objects on a published page can result in unexpected behavior. This is because each Pagination Navigation Object outputs a subfolder with an index page. More than one instance of this Navigation Object on a page will out multiple subfolders with the same name which will result in pages overwriting each other. We recommend using only one per page. 

To create this object, go to Assets > Navigation and click Create new navigation and select Pagination.

After completing the standard options used for all types of Navigation Objects, fill in each of the following, where relevant:

ItemDescription
Content type name Select the type of content returned by the Navigation Object.
Number of pieces of content to display on page The number of Content Items you want to display on each page.
Maximum number of pieces of content to display The maximum number of Content Items you want to retrieve and paginate.
Maximum number of links to display on page The maximum number of pagination links to display on each page. Where the total number of pages exceeds the maximum number of links to display on a page, links to the pages before/after the current page are displayed, along with links to first page, previous page, next page and last page.
Fetch method
  • Use current section: display content that is within the current Section, not including any Subsections
  • Use current branch: display content that is within the current Section, including Subsections
  • Use branch: display content from within a specific Section and Subsections
  • Use branch at level: display content from within a specific Section and Subsections, but only starting at a specific level within that branch
  • Use section: display content from within a specific Section, not including any Subsections

Pagination Navigation Object will not return any content for Sections included in the Ignore section names on publish per channel configuration option
Current branch level to look at The level of the current branch of the hierarchy at which to start. Level 1 is considered to be the root (or home section) of the channel, regardless of whether Microsites are used or not.
Number of levels to recurse The number of levels down the hierarchy to recurse to find content. A value of 0 will recurse indefinitely. This is only available if the Fetch method is Use current branch, Use branch or Use branch at level.
Select section Where the Fetch method is Use branch or Use section, select the section from which to start the search for content.
Hidden sections Checkbox to also search sections that have been hidden from navigation.
Before HTML HTML output before the Navigation Object.
After HTML HTML output after the Navigation Object.
Before pagination HTML The code to be output before the pagination links.
Between pagination HTML The code to be output between each pagination link.
After pagination HTML The code to be output after the pagination links.
Content layouts Use channel default (set on the Channel settings) or select alternate Content Layout.
Alternate content layout If the channel default is not used, enter the name of the alternate Content Layout.

Review your entries and selections, if you are satisfied with your entries, click Next to generate the object.

Once generated, highlight the T4 Tag Embed Code, copy to your clipboard (Ctrl+C) and paste into a Page Layout or Content Layout or within a Content Item.