Acquia Copilot is a conversational AI connected into our product documentation and knowledge base. Ask Copilot about product features, technical details, troubleshooting and how to get started with Acquia products.
Use the Pagination element to add pagination to your View template. The Pagination element can be used to display Drupal's built in pagination for Views or use Ajax driven infinite scroll. Infinite scroll requires the contributed module Views Infinite Scroll to be installed.
Pagination is configured within Drupal's views user interface.
Locating the pagination element
To find the Pagination element:
Navigate to a page or template with the Layout canvas
Click the + button on the Layout canvas
Within the Elements tab, look for the Pagination element.
The Pagination element includes the following fields:
Select pager
View - Select the View your template is for
View display - Select the View display.View displays are set-up within Drupal views
Pager - Select the pager type. Even though this is a select, there will only be one option as this is configured within the Drupal view.
Paged output, full pager - Default full pager provided by Drupal. If selected, you can enter the content for each link and select a Custom list item style for them
Paged output, mini pager - Default mini pager provided by Drupal. If selected, you can enter the content for each link and select a Custom list item style for them
Infinite Scroll - Infinite scroll provided by the Views Infinite Scroll module. If selected you can choose to load content automatically as the user scrolls the page or display a button to load more content. If you choose to display a button, you can provide the button text and select a List item custom style for it.
Important
If you use Infinite Scroll you must enable use AJAX. This is found within the Views user interface in Advanced > Use AJAX. If you choose to display a button to load more content, Views Infinite Scroll requires this to be a List. For this reason you need to create a List custom style and make it look like a button.