Change Prev - page 1 of 4 - Next to Prev - 1 2 3 4 - Next

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 15, 2011   (RSS)

By Mikey - February 15, 2011

I need to change the way the Prev/Next displays the total list page results. Right now if I have 4 page it displays like (Prev - page 1 of 4 - Next). I need to change it so it reads like (Prev - 1 2 3 4 - Next) and if a 5 list page is created by new content additions it continues to increase the total like so (Prev - 1 2 3 4 5 - Next) (Prev - 1 2 3 4 5 6 - Next) and so on. Anyone have any suggestions?

<!-- STEP3: Display Page Links (Paste anywhere below "Load Record List") -->
<?php if ($newsMetaData['prevPage']): ?>
<a href="<?php echo $newsMetaData['prevPageLink'] ?>">&lt;&lt; prev</a>
<?php else: ?>
&lt;&lt; prev
<?php endif ?>

- page <?php echo $newsMetaData['page'] ?> of <?php echo $newsMetaData['totalPages'] ?> -

<?php if ($newsMetaData['nextPage']): ?>
<a href="<?php echo $newsMetaData['nextPageLink'] ?>">next &gt;&gt;</a>
<?php else: ?>
next &gt;&gt;
<?php endif ?>
<!-- /STEP3: Display Page Links -->

Re: [zick] Change Prev - page 1 of 4 - Next to Prev - 1 2 3 4 - Next

By Toledoh - February 15, 2011 - edited: February 15, 2011

Hey Zick,

This one's in my bookmarks.

http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=58688
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Change Prev - page 1 of 4 - Next to Prev - 1 2 3 4 - Next

By Mikey - February 15, 2011 - edited: February 15, 2011

Hey Tim,
The link you provided seems to be cycling back to this thread, but I did find a solution just minutes after I posted this thread. It may be the same one you where trying to send me to. I just finished testing and it works just like I needed it to... Thanks for the help.
Zick

http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=77535