How pagination works

Category: Joomla!
 
 
This article describes logical concept of how pagination works. It does not describe only Phoca extensions or Joomla! CMS but the common using of pagination in Internet. As example, Phoca Gallery extension is used.

 

In Phoca Gallery you can use two types of pagination: one for Categories view - list of categories and second for Category view - list of images.

 

1) List of categories in Categories view - see image:

List of categories

 You can just display number of categories which will be displayed on one page.
 
2) The same you can do for images in Category view - see image:
 
List of images
You can just display number of images which will be displayed on one page.
 
3) But in Phoca Gallery, in Category view, you can display subcategories too. This means, on one page, you can display list of categories and list of images but there can be used only one pagination - see images:
 
List of images and categories
or
List of images and categories
 
 
 

On one page, you can display only one pagination

On one page, you can display only one pagination:
  • to not confuse visitors of your site (see image above)
  • to use unique pagination key (because of URL links)

For example, if there will exist a link to your site and it will include parameter limitstart=20 (it means the pagination begins on second page - starting with image 20), your site needs to identify which pagination it should use - if there will be two pagination features on your site, it will be not clearly identifiable if image or category pagination should be used. This will be logical conflict.

 

Pagination in Phoca Gallery - in Category view

As written, we can use only one pagination on the page. Category view in Phoca Gallery can list images and subcategories of selected category and we need to select only one pagination, so why image pagination is used:

  • it is still Category view - a list of images - so primarily we list here images, displaying of subcategories is an extra feature
  • mostly there are more images in category than subcategories - this is why the image pagination takes precedence
  • the same for using links to your site - when some site links to your site to list images which should begin on second page then the pagination for images needs to be used.