Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • trancehr Friend
    #160535

    Hi!

    Is there a way to shorten pagination result from showing 10 pages to 5 pages?
    Instead of
    « Start « 1 2 3 4 5 6 7 8 9 10 » End »
    to show like this
    « Start « 1 2 3 4 5 » End »

    Thank you for your help.

    thangnn1510 Friend
    #377868

    <blockquote>I did quite some research on this, there are two things which are messing it up for you :
    1. Translated text ‘word count” is more. So it goes over board.
    2. The “Bladsy 9 van 13” in brown box, should be placed in the second line.

    I might be wrong on this one, but i could not find any template override for this case in the template you are using (rasite) or any template as whole (even the joomla defaults).

    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 :
    <blockquote>
    // Set the pagination iteration loop values
    $displayedPages = 10;</blockquote>

    Change it to :
    <blockquote>
    // Set the pagination iteration loop values
    $displayedPages = 6;</blockquote>

    you can increase it suit your site.

    Remember, its a edit to Joomla Core file and you would need to redo it, once you update your joomla version.

    Please let me know if it helps.

    you can read more about it here :

    http://docs.joomla.org/JPagination
    http://docs.joomla.org/Using_JPagination_in_your_component

    Regards

    Arvind</blockquote>

    Please do as Arvind suggest!

    trancehr Friend
    #378302

    I tried to use this one but there’s no change in number of shown pages.

    I don’t know if this matters but I’ve been using T3 v2 default pagination.php

    Thanks for replay

    thangnn1510 Friend
    #378804

    Dear trancehr!

    Which template are you using?

    Regards!

    trancehr Friend
    #379674

    <em>@thangnn1510 224324 wrote:</em><blockquote>Dear trancehr!

    Which template are you using?

    Regards!</blockquote>

    I’m doing my custom template with T3 v2 framework.
    I guess that it has sth to with pagination.php file in html folder 🙂

    thangnn1510 Friend
    #379808

    Dear trancehr!

    Could you send me the login information to your site. (FTP, Admin) via PM. I’ll have a look for you.

    Regards!

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  thangnn1510 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum