Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Is there a jump to page feature?

 

 


Izadorra
User

May 9, 2008, 8:54 AM

Post #1 of 7 (424 views)
Shortcut
Is there a jump to page feature? Can't Post

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?


Dave
Staff / Moderator


May 9, 2008, 9:18 AM

Post #2 of 7 (423 views)
Shortcut
Re: [Izadorra] Is there a jump to page feature? [In reply to] Can't Post

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


Izadorra
User

May 9, 2008, 10:53 AM

Post #3 of 7 (418 views)
Shortcut
Re: [Dave] Is there a jump to page feature? [In reply to] Can't Post

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


Dave
Staff / Moderator


May 10, 2008, 2:32 PM

Post #4 of 7 (394 views)
Shortcut
Re: [Izadorra] Is there a jump to page feature? [In reply to] Can't Post

Your viewer code will return 2 articles, something like this:


Code
  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:


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!

Dave Edis - Senior Developer
interactivetools.com


brownleather
User

May 19, 2008, 3:47 PM

Post #5 of 7 (351 views)
Shortcut
Re: [Dave] Is there a jump to page feature? [In reply to] Can't Post

exactly, thanks much.


Wolf-E
User

Jun 2, 2008, 12:24 PM

Post #6 of 7 (278 views)
Shortcut
Re: [Dave] Is there a jump to page feature? [In reply to] Can't Post

That seems to have done the trick! Thanks.


(This post was edited by Wolf-E on Jun 3, 2008, 10:44 AM)


Dave
Staff / Moderator


Jun 2, 2008, 1:30 PM

Post #7 of 7 (275 views)
Shortcut
Re: [Wolf-E] Is there a jump to page feature? [In reply to] Can't Post

Hi Wolf-E,

Just put this code in your page where you want it to display the page numbers:


Code
<?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

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4