Joomla pagination problem

Discussion in 'Joomla' started by igordr, Apr 19, 2010.

  1. #1
    Hello guys,

    I would like to ask how to limit number of pages shown in pagination of joomla site ?

    For example 1-2-3-4-5-6-7 I would like to be 1-2-3-4

    Thanks !

    All the best !
     
    igordr, Apr 19, 2010 IP
  2. zealotry

    zealotry Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    open yer site with ftp client
    find pagination.php in /libraries/joomla/html folder and open it
    around line 96 you will find $displayedPages = X
    change X with 4
    save the file
    yer done
     
    zealotry, Feb 14, 2012 IP
  3. siketich91

    siketich91 Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The only solution to this problem is to limit the pagination from 1,2,3,......10 to something like 1,2,3......6 . However, for this you will need to hack (edit) the joomla core file. This is usually not practiced, as we use template overrides to avoid hacking the joomla core files.

    Well, back to the point. You can limit the number of pages it shows from 1-10 to anything less which corrects the problem. For that open >> /your_site_root/libraries/joomla/html/pagination.php file.

    around line 95-96, you will see this code :


    // Set the pagination iteration loop values
    $displayedPages = 10;

    Change it to :


    // Set the pagination iteration loop values
    $displayedPages = 6;

    you can increase it suit your site.
     
    siketich91, Feb 15, 2012 IP
  4. zealotry

    zealotry Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    wow
    i said that already u just explain yerself too much
     
    zealotry, Feb 15, 2012 IP