Jump to content

Change number of displaying pages in pagination (pagination.tpl) - Prestashop 1.6


Recommended Posts

Hi.

 

I'm having trouble with changing number of displayed pages in pagination.

 

 

I'm trying to change this:

 

SsGIDbx.jpg

 

 

into something like this:

 

Ob3dcEu.jpg

 

I've found section in pagination.tpl file responsible for the number of displayed pages:

{section name=pagination start=$start loop=$stop+1 step=1}
            {if $p == $smarty.section.pagination.index}
                <li class="current"><span>{$p|escape:'htmlall':'UTF-8'}</span></li>
            {else}
                <li><a {$no_follow_text} href="{$link->goPage($requestPage, $smarty.section.pagination.index)}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
            {/if}
        {/section}

and by changing loop to "loop=$stop+7" it displays more pages but on the last page it shows 2 non existing pages (11 and 12).

 

 

Any ideas on how to stop the loop at the end of existing pages?

 

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...