Previous / Next Problem

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

Re: [pothompson] Previous / Next Problem

By Jason - September 2, 2010

Hi,

What we need to do is not use whereRecordNumberInUrl(1) when there is not page information in the url. What we need to do is to get the category number from the URL, this should be the first variable.

Try using this code to select your category records:


if($_REQUEST){
$catKey = array_keys($_REQUEST);
$catKey = $catKey[0];
$catNum = "num=".intval($_REQUEST[$catKey]);
}
else{
$catNum = whereRecordNumberInUrl(1);
}


list($categoriesRecords, $categoriesMetaData) = getRecords(array(
'tableName' => 'categories',
'where' => $catNum,
));


Give that a try and let me know if that works for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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