Prev/Next links on a Detail page?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: March 8, 2010   (RSS)

By zip222 - March 7, 2010

Is there a way to include links to the previous and next records on a Detail page?

Re: [zip222] Prev/Next links on a Detail page?

By zip222 - March 7, 2010

Got it. Here it is in case someone else is looking for this...

Place this in your header. change the table name to your table name:

list($prevRecord, $nextRecord, $firstRecord, $lastRecord) = getPrevAndNextRecords(array(
'tableName' => 'portfolio',
'recordNum' => getNumberFromEndOfUrl(),
));


And here are the relevant variables:

Previous Record: <?php echo $prevRecord['_link'] ?>
Next Record: <?php if($nextRecord): ?>
First Record: <?php echo $firstRecord['_link'] ?>
Last Record: <?php echo $lastRecord['_link'] ?>

Re: [zip222] Prev/Next links on a Detail page?

By Donna - March 8, 2010

Glad to hear you got that sorted out! :)
Donna

--
support@interactivetools.com