Detail link always goes to same page

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

Hi - My detail link always goes to the same record detail page (the article at the top of the list in the cms). The generated code shows that the links are different (page.php?uniqueArticleTitle). Any idea why this is happening? Thank you. Wendy

By Damon - September 5, 2014

Hi Wendy,

If you are always seeing the most recent article for every detail article page, I suspect that the where statement in the getrecords code at the top of your detail page template is set to always load first record in the database like this:

  'where'       => '', // load first record


Change the where statement to the following to display the record based on the record # from end of URL:

'where'       => whereRecordNumberInUrl(0),

Cheers,
Damon Edis - interactivetools.com

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