bottom pagination number no dispaly correctly

Rate this topic: Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.3.50 out of 6 based on 2 vote(s)
GK User
Wed Aug 06, 2014 11:03 am
Reply with quote
Report this post
Hi Support,

I have this problem, pagination number no display correctly after the page 7... the number are not showing in sequence.
You can view my site URL: http://amberbrooktoys.com/brands/djeco?start=108

Thanks,

Sam
User avatar
Senior Boarder

teitbite
Thu Aug 07, 2014 3:18 pm
Reply with quote
Report this post
Hi

Please edit /html/pagination.php and replace code:

Code: Select all
   if(count($list['pages']) >= 7) {
      $founded = false;
      
      for($i = 1; $i <= count($list['pages']); $i++) {
         if($list['pages'][$i]['active'] != 1) {
            $founded = $i;
            break;
         }
      }
      
      for($i = 1; $i <= count($list['pages']); $i++) {
         if($i == 1 && $founded > $i + 2) {
            $html .= '<li><span>&hellip;</span></li>';
         }
         
         if($i == count($list['pages']) && $founded < $i - 2) {
            $html .= '<li><span>&hellip;</span></li>';
         }
         
         if($i >= $founded - 2 && $i <= $founded + 2) {
            $html .= '<li>'.$list['pages'][$i]['data'].'</li>';
         }
      }
   } else {
      for($i = 1; $i <= count($list['pages']); $i++) {
         $html .= '<li>'.$list['pages'][$i]['data'].'</li>';
      }
   }


with:

Code: Select all
      for($i = 1; $i <= count($list['pages']); $i++) {
         $html .= '<li>'.$list['pages'][$i]['data'].'</li>';
      }
User avatar
Moderator

GK User
Mon Aug 11, 2014 6:55 pm
Reply with quote
Report this post
Hi,

Thank you so much for your code.
Now it only show 1-10 pages.
I have 1-17 pages, after 10, it will not show out 11, 12, 13, ...... to 17
Can you please tell me how to solve this?

You can see the page at http://amberbrooktoys.com/brands/djeco?start=162

Thanks,

Sam
User avatar
Senior Boarder

teitbite
Tue Aug 12, 2014 4:26 pm
Reply with quote
Report this post
Hi

That's odd. This modification should display all element even if breaking the one line. Please send me an ftp access.
User avatar
Moderator

GK User
Tue Aug 12, 2014 5:25 pm
Reply with quote
Report this post
Hi Teitbite,

I have sent you my FTP login to your gmail.
Thanks,

Sam
User avatar
Senior Boarder

teitbite
Wed Aug 13, 2014 11:59 am
Reply with quote
Report this post
Hi

Looks like in this template simply renaming /html/pagination.php to /html/_pagination.php which means using a default pagination file works best. The list of pages available is already cut to max of 10 so any modification won't fix the problem.
User avatar
Moderator

GK User
Wed Aug 13, 2014 12:39 pm
Reply with quote
Report this post
Hi Teitbite

You are rock.

Thank you so much.

Sam
User avatar
Senior Boarder

teitbite
Thu Aug 14, 2014 3:32 pm
Reply with quote
Report this post
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron