Show Prev and Next page links only when page limit exceeded

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 23, 2009   (RSS)

Re: [dwelling] Show Prev and Next page links only when page limit exceeded

By Dave - February 23, 2009

Hi Jeremy,

So, when it displays "page X of Y" you only want that to show if the Y value is greater than one? If that's right you can do that as follows. Search your code for 'totalPages', you'll find some php code that looks like this: <?php echo $newsMetaData['totalPages'] ?>

Note that is will have a different variable name (newsMetaData) depending on what you named your table. Copy that code into an if block like this:

<?php if ($newsMetaData['totalPages'] > 1): ?>
... content you want displayed here ...
<?php endif ?>

Hope that helps! Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Show Prev and Next page links only when page limit exceeded

By dwellingproductions - February 23, 2009

Dave,

That works perfectly! Thanks so much. Now I can let my brain rest! :-)

Jeremy
---------------------------

Dwelling Productions

www.dwellingproductions.com