Listing page keeps going to first record

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 25, 2008   (RSS)

Re: [chassa2556] Listing page keeps going to first record

By MisterJim - September 24, 2008 - edited: September 24, 2008

Without knowing exactly what it is you are trying to accomplish, it's possible that this may solve what it is I THINK you're doing...

I'm assuming that you have two pages: a list page and then a detail page. The detail page would be the one that pops up when you click on 'read more'. I'm also assuming that you are restricting anything listed on your list page to items that fall within the category "Join Us".

If I'm correct, try this:

1. In your list page, add the following line to your header code:

'where' => 'category = "Join Us"',

After you add that code, that 'where' statement should be the only 'where' statement in the list page's header code.

2. Remove that same line from the header on your existing detail page and replace it with the following lines:

'where' => whereRecordNumberInUrl(1),
'limit' => '1',

3. Finally, change the code in your list page to read:

<a href="involvedDetail.php?<?php echo $involvedRecord['_link'] ?>"> see more </a>

I hope that I guessed correctly as to what you are trying to do. Let us know how you make out.

Best,
Jim
WebCamp One, LLC



Websites That Work

Re: [Mr Jim] Listing page keeps going to first record

Thanks so much Mr Jim - that worked just fine. Its working fine now this filtering by category seems to unlock a way of using fewer templates - which makes big time savings.