List and page viewer in a single page

5 posts by 2 authors in: Forums > CMS Builder
Last Post: May 30, 2008   (RSS)

Re: [jconnect] List and page viewer in a single page

By Dave - May 30, 2008

Hi jconnect,

So the sidebar section is a single page/record menu right?

Try removing this line "'where' => whereRecordNumberInUrl(1), " from the sidebar code and add the @ to hide errors so you end up with this:

list($sidebarRecords, $sidebarDetails) = getRecords(array(
'tableName' => 'sidebar',
'limit' => '1',
));

$sidebarRecord = @$sidebarRecords[0]; // get first record


Let me know if that fixes it. If not we'll keep trying.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] List and page viewer in a single page

By jconnect - May 30, 2008

Hi Dave,

That did it exactly! I am assuming that if no 'where' parameter is specified, it just defaults to the first record? Thanks a million, especially for the super fast response!

Re: [jconnect] List and page viewer in a single page

By Dave - May 30, 2008

That's right, if there is no "where" then it lists all records, and the limit = 1 makes it only return 1.

There's only one record in that section anyway but if there was more you can use limit to control how many are returned.

Glad to be of help! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] List and page viewer in a single page

By jconnect - May 30, 2008

Thank you for the clarification. I look forward to really getting into this product!

J