Is there a jump to page feature?
7 posts by 4 authors in: Forums > CMS Builder
Last Post: June 2, 2008 (RSS)
By Izadorra - May 9, 2008
Re: [Izadorra] Is there a jump to page feature?
By Dave - May 9, 2008
Let me know.
interactivetools.com
Re: [Dave] Is there a jump to page feature?
By Izadorra - May 9, 2008
http://melbasart.com/gallery/thumbnails.php?album=1
Re: [Izadorra] Is there a jump to page feature?
By Dave - May 10, 2008
list($newsRecords, $newsDetails) = getRecords(array(...
The second one has the total number of pages in it. Insert whatever the variable name is in your code viewer (mine is $newsDetails), the url to your list viewer, and try this code:
Page:
<?php foreach (range(1,$newsDetails['totalPages']) as $page): ?>
<a href="listViewer.php?page=<?php echo $page; ?>"><?php echo $page; ?></a>
<?php endforeach; ?>
This will output: Page 1 2 3 4 5 6 7, etc. And you can then format that however you like.
Hope that helps!
interactivetools.com
Re: [Dave] Is there a jump to page feature?
By Wolf-E - June 2, 2008 - edited: June 3, 2008
Re: [Wolf-E] Is there a jump to page feature?
By Dave - June 2, 2008
Just put this code in your page where you want it to display the page numbers:
<?php foreach (range(1,$newsDetails['totalPages']) as $page): ?>
<a href="listViewer.php?page=<?php echo $page; ?>"><?php echo $page; ?></a>
<?php endforeach; ?>
It doesn't need anything else around it. Feel free to experiment cutting and pasting and moving things around. Worst case you can just hit undo or revert to a backup (make a backup first if you have a file that's working the way you want).
Hope that helps, if you keep having problems feel free to post a link and/or attach the viewer file to your post and I'll have a look.
interactivetools.com