Paging
Build configurable pagination for FactFinder search results.
Documentation
Overview
With the ff-paging element, you can build a custom paging for your search results.
A paging may contain several ff-paging-set elements, and each ff-paging-set element contains several ff-paging-item elements.
You can access the page number a paging item represents with the {{page}} syntax.
<ff-paging id="paging2">
<ff-paging-item type="currentLink -2">{{page}}</ff-paging-item>
<ff-paging-item type="currentLink -1">{{page}}</ff-paging-item>
<ff-paging-item type="currentLink" style="font-weight: bold;">{{page}}</ff-paging-item>
<ff-paging-item type="currentLink +1">{{page}}</ff-paging-item>
<ff-paging-item type="currentLink +2">{{page}}</ff-paging-item>
</ff-paging>Demo
Try the Paging demo.
API code
ff-paging
Properties
Events
ff-paging-set
Properties
Methods
ff-paging-item
Properties
show-only
When the show-only attribute is present, the paging does not react to clicks.
paging-set
Define different ff-paging-set elements based on which page you are on right now.
The state attribute is evaluated as a boolean expression. When its value is true, the ff-paging-set is visible.
The possible variables to build the expressions are currentPage, pageCount, and numeric values.
paging-item
You can style the different ff-paging-item elements and define which links you want to display in a given paging-set.
This might look cumbersome and bloated, but it gives a very defined and in-depth way to design your paging element.
You have to set a type attribute in the ff-paging-item where you select a "page". This is an expression built from the possible values below:
firstLink: Points to the first page.
lastLink: Points to the last page.
nextLink: Points to the next page if available. (
currentPage +1)Usually this link is displayed as an arrow or something similar.
previousLink: Points to the previous page if available. (
currentPage -1)Usually this link is displayed as an arrow or something similar.
currentLink: Points to the current page. You can add or subtract to define a specific page like
currentLink+2orcurrentLink-1.
The paging-item also has a show-only attribute and works like the show-only on the paging itself.
Between the ff-paging-items, you can add placeholders such as .... They will always be visible.
Rendered HTML
The template you provide in an ff-paging-item tag will be rendered inside a wrapping div:
Example implementation
Last updated
Was this helpful?