[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

Drupal. How to set up/use/edit pagination

This tutorial is going to show you how to set up/use/edit pagination on your Drupal template.

Pagination allows your visitors to use a ‘pager’ added to the bottom of your page to navigate through numerous content items within that page. In order to add the pager:

  1. In your Drupal admin panel, go to the top menu Structure -> Views:

    Find the View you want to add the pager to and click on “edit” under the ‘OPERATIONS’ column.

    Alternatively, go to the page with the block view from the front end of your site, mouse over its right corner and select “Edit View:

  2. On the next page called  “Displays”  under the Page settings  you  should fund the “Pager” option.  Click on the link next to the Use pager.

    You will see the following options:

    • Display a specified number of items where you can specify how many content items you want to be displayed without a pager being rendered. You might want to use this approach when you only want to list the first three items
    • Display all items lists every content item that meets the criteria specified in the view definition. This option works well for situations where there are fewer than 25 content items in the list. More than 25, and visitors are unlikely to scroll through them all.
    • Paged output, full pager results in a list of items (say,10 items) followed by a pager. A full pager lists other options, such as “Jump to the start of the list,” “Jump to the end of the list,” “Previous,” and “Next.”
    • Paged output, mini pager is similar to the full pager, but only provides navigational controls for previous and next.

    Click on Apply to save the changes.

  3. By default, the Views module renders lists using a pager with 10 items per page. Click on “Paged, #  items” to change this value.
    The following options will show up:
    • Items per page: specify how many items you want to display per page;
    • Offset: specify the starting item for your view; for example, if you want to skip the first 2 items and start at number 3, you would enter 2 in the offset field
    • the pager ID just leave this value as the default
    • the number of pages you want to display leave it as blank to show all pages
    • and you have the option of exposing the options for the visitor to set the number of items per page and the offset

    Click on Apply to save the changes.

  4. If you want to get the whole page to re-load when you browse  navigate using the pager, set Use AJAX to “yes” in the Advanced options:

  5. Click on “Save” to save the changes.
  6. Feel free to check the detailed video tutorial below:

    Drupal. How to set up/use/edit pagination