Single record not appearing on subsequent records

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

Hi

I have a separate single record file which I have called "extras", which I want to appear on every page. I have loaded this code in the header, ie,

// load records
list($extrasRecords, $extrasMetaData) = getRecords(array(
'tableName' => 'extras',
'where' => whereRecordNumberInUrl(1),
));
$extrasRecord = @$extrasRecords[0]; // get first record


The "extras" are appearing on the first multi record page of my photographic_courses.php?1, but not on subsequent ones, ie, photographic_courses.php?2, etc. Am I doing something wrong?

Thanks

Re: [degreesnorth] Single record not appearing on subsequent records

By gkornbluth - April 5, 2011

Hi degreesnorth,

Try removing
'where' => whereRecordNumberInUrl(1),
from the get records code.

Otherwise the information will only appear when the first multi record page is called .

That should do it for you.

The CMSB Cookbook www.thecmsbcookbook.com contains a lot of recipes with information about how to access more than one table in a viewer.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php