Functions/pagination links

pagination_links automatically creates an unordered list of pagination links whenever there are paginated results. This help is used on the items/browse.php and collections/browse.php templates in Omeka themes.

Usage

<?php echo pagination_links($options = array()); ?>

Arguments

  • $options (array) - An array of options to configure the pagination list. Available options include:
    • 'scrolling_style' - The style of scrolling for the page output. Default value is 'Sliding'. Values include:
      • All - Returns every available page.
      • Elastic - The list of pages will expand as you go further into the paged results.
      • Jumping - When a user selects a page, the list advances to the end of the given range.
      • Sliding - Positions the current page number in the center of the list.
    • 'partial_file' - The template file to use to for pagination. The default is application/views/scripts/common/pagination_control.php.
    • 'page_range' - The range of pages to display. The default value is 5.
    • 'total_results' - The total number of results to paginate through.
    • 'page' - The current page of the result set.
    • 'per_page' - The number of records to return per page.