$selectedCategory and Pagination conflict?

17 posts by 6 authors in: Forums > CMS Builder
Last Post: June 21, 2010   (RSS)

By Chris - March 9, 2010

Hi Perch,

I think the best solution may be to change the behaviour of 'selectedCategoryNum' so that it treats "0" differently than if 'selectedCategoryNum' hasn't been defined at all. Unfortunately, this is something that we'll need to change in CMSB, and we'll need to discuss all the implications first so we can be sure we're not going to break any existing sites out in the wild when other people upgrade their software.

In the meantime, I think Dave's solution of suffixing nexp/prev links with "&lastNum=0" will solve both of your issues. It's the simplest solution I can think of that doesn't involve modifying CMSB.

Thanks for bringing this to our attention though, it'll make it easier for us to figure out how to solve the root problem.

I hope this helps answer your questions. Please let me know if you have any others. :)
All the best,
Chris

Re: [chris] $selectedCategory and Pagination conflict?

By Chris - March 29, 2010

Hi everyone,

This issue will be fixed properly in the next version of CMS Builder (which will likely be called 2.04.) If you need the fix before it's released, please see this thread:

http://www.interactivetools.com/forum/gforum.cgi?post=78862#78862
All the best,
Chris

Re: [chris] $selectedCategory and Pagination conflict?

By studio-a - June 20, 2010

Hello,

We are experiencing the same problem with including the category number within the URL and then trying to use the pagination. We have tried the solution Dave wrote - placing the "&lastNum=0" at the end of nexp/prev links, but this has not helped. In fact, with Dave’s recommendation in place and when the “next” link is clicked we receive an HTTP 404 Not Found error. The example URL is displayed below.

http://www.mydomain.com/pages/list.test.php?service_categories=5&page=2&lastNum=0

We are using CMS Builder v2.04. Why would we get a 404 error? If we remove the “&lastNum=0” the page displays, but with the wrong category content (category 2 is display when it should be category 5). Are we missing some additional code within the php file?

Attached is our sample file. You’ll note a list section is commented out, that’s another complication with an additional table. One thing at a time, pagination first.

Any help in getting our page to work with proper pagination is appreciated!

Thanks,

studio-a
Attachments:

list-test-cmssample.php 4K

Re: [studio-a] $selectedCategory and Pagination conflict?

By Jason - June 21, 2010

Hi,

If you could send me a link to a live page, I could take a closer look.

If you don't want to post it to the forum, please email it with a reference back to this post to jason@interactivetools.com

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [studio-a] $selectedCategory and Pagination conflict?

By Jason - June 21, 2010

Sorry, I didn't receive the email, could you try sending it again:

jason@interactivetools.com
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] $selectedCategory and Pagination conflict?

By studio-a - June 21, 2010

Hi Jason,

We resent you the email.

Looking forward to your reply!

studio-a