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

Is there a way to type in or click on a specific page rather than scroll through all pages using the arrows at the bottom?

Re: [Izadorra] Is there a jump to page feature?

By Dave - May 9, 2008

You mean with the pages that are displayed on the website with prev/next links? Or something else? Do you have an url of a site that shows how you'd like it to work?

Let me know.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Is there a jump to page feature?

By Izadorra - May 9, 2008

Yes, exactly. The prev and next arrows are good but if you have a bunch of pages it would be nice to be able to just click on the page number. Something like the bottom of this page;

http://melbasart.com/gallery/thumbnails.php?album=1

Re: [Dave] Is there a jump to page feature?

exactly, thanks much.

Re: [Dave] Is there a jump to page feature?

By Wolf-E - June 2, 2008 - edited: June 3, 2008

That seems to have done the trick! Thanks.

Re: [Wolf-E] Is there a jump to page feature?

By Dave - June 2, 2008

Hi Wolf-E,

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.
Dave Edis - Senior Developer
interactivetools.com