Listing page keeps going to first record

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

I have my 'see more' link going to

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

I have set it up so it all goes to one section with a category filter. The trouble is it keeps going to the first record. This is even though I am on the second or third record and am expecting it to go to the relating detail page.

This is my header code
list($involvedRecords, $involvedDetails) = getRecords(array(
'tableName' => 'involved',
'where' => ' category = "Join Us" ',
));

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