Categories

Featured templates

Drupal. How to set up/use/edit pagination

Norman Fisher May 30, 2012
Rating: 5.0/5. From 1 vote.
Please wait...

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.

  • 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:

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

    Drupal. How to set up/use/edit pagination

    Responsive Drupal Templates
    This entry was posted in Drupal Tutorials and tagged archived_tutorial, drupal, pager, pagination. Bookmark the permalink.

    Submit a ticket

    If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket