Some Help

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 4, 2012   (RSS)

Re: [efi-revivo] Some Help

By Jason - June 1, 2012

Hi,

There is a CMSB function called getPrevAndNextRecords().

For example:

list($prevRecord, $nextRecord, $firstRecord, $lastRecord) = getPrevAndNextRecords(array(
'tableName' => 'news',
'recordNum' => $record['num'],
'where' => '1', // optional - defaults to all records in section
'orderBy' => 'createdDate', // optional - defaults to schema listPageOrder
));


In this example $record would be the record you were outputting on your detail page. You would also want to replace the "where" option with the same where clause used on your list page.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Some Help

By efi-revivo - June 4, 2012 - edited: June 4, 2012

Thanks it's work :-)