For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Properties
Name
Description

paging (Object, default: empty)

Paging data from FactFinder.

show-only (String, default: "false")

Displays pages without allowing clicks.

Events

Events
Name
Description

dom-updated

Fires after the element receives data and renders its templates.

ff-paging-set

Properties

Properties
Name
Description

state (String, default: "all")

Expression that determines whether the set is active.

is-active (Boolean, default: true)

Determines whether the paging set is active.

paging (Object, default: empty)

Paging data from FactFinder.

Methods

Methods
Name
Description

hideSelf()

Hides the paging set.

showSelf()

Shows the paging set.

ff-paging-item

Properties

Properties
Name
Description

type (String, default: "pageLink")

Page type: currentLink, firstLink, lastLink, nextLink, previousLink, or pageLink.

paging-item (Object, default: empty)

Paging item data from FactFinder.

show-only (String, default: empty)

Displays the page without allowing clicks.

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+2 or currentLink-1.

The ff-paging-item will only be visible when the expression resolves to a valid page.

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?