Invalid page number

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

By Djulia - December 23, 2007

Hi,

I have a category superior (Blog) with several recordings.

Now, I would like to obtain the list of the recordings (blogList.php) on the blogPage.php page to create a menu of navigation.

If I use the code of blogList.php in blogPage.php, I obtain the following error message :
List Viewer (blog): Invalid page number “5”, there are only “1” pages!

There is a solution for solve problem ?

Thank you for your assistance.

Djulia

Re: [Djulia] Invalid page number

By Dave - December 23, 2007

If you don't specify a page number then the viewers try and get the page number off then end of the url.

Because you have two viewers on one page, they're both using that same page number. So when your url has a 5 on the end it tries to display record 5 and page 5 of the list.

Try hardcoding the List Viewer to always be on page 1 and show all records (or whatever you like) with these options:

# Change these List Viewer Options
$options['pageNum'] = '1';
$options['perPage'] = '9999';

Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Invalid page number

By Djulia - December 23, 2007

That functions perfectly. [:)]

With your assistance, I start to see the great possibilities of your software.

Thank you Dave. [:)]

Djulia