List item pagination question

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 6, 2011   (RSS)

Re: [kkegans] List item pagination question

By Jason - April 6, 2011

Hi Kurt,

So if I understand correctly, the next one after that would then look like this:

< | ITEM 2 | ITEM 3 | ITEM 4 | >

Is that right? This is possible, but it can get there isn't a straight forward way of doing this using the 'perPage' option. One approach would be to use the 'offset' and 'limit' options instead of 'perPage'
(see [url http://www.interactivetools.com/docs/cmsbuilder/viewer_options.html]CMS Builder Docs[/url])

The simplest solution would be to output a link that goes back to the first page when you reach the end of your list. That that sense, you last page would look like this:
< | ITEM 7 | ITEM 8 | >

You could use code that looked like this to output a link to the first page when you reach the end:

<?php if(!$myRecordsMetaData['nextPage']): ?>
<a href = "<?php echo $myRecordsMetaData['firstPageLink'];?>"> &gt; </a>
<?php endif ?>


Would this work for you? If you really need the first option, we could help you create this through our consulting service. If you're interested in this, please send an email to consulting@interactivetools.com.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/