HI,
thanks! 'selectedCategoryNum' => '0', was the missing piece I needed for getting this to work!
Here is the code I ended up using:
if ($getSection == "nav") {
// Menu 1 (selected)
list($categoryRecords, $selectedCategory) = getCategories(array(
'tableName' => 'nav',
'defaultCategory' => 'first', // Enter 'first', a category number, or leave blank '' for none
'categoryFormat' => 'onelevel', // showall, onelevel, twolevel
'ulAttributesCallback' => 'customMenuUlAttr', // ADVANCED: custom function to return ul attributes, eg: myUlAttr($category);
'liAttributesCallback' => 'customMenuLiAttr', // ADVANCED: custom function to return li attributes, eg: myLiAttr($category);
'selectedCategoryNum' => mysql_escapef(@$getRecord),
));
// Menu 2
list($categoryRecords2) = getCategories(array(
'tableName' => 'nav2',
'defaultCategory' => '', // Enter 'first', a category number, or leave blank '' for none
'categoryFormat' => 'onelevel', // showall, onelevel, twolevel
'ulAttributesCallback' => 'customMenuUlAttr', // ADVANCED: custom function to return ul attributes, eg: myUlAttr($category);
'liAttributesCallback' => 'customMenuLiAttr', // ADVANCED: custom function to return li attributes, eg: myLiAttr($category);
'selectedCategoryNum' => '0'
));
} elseif ($getSection == "nav2") {
// Menu 1
list($categoryRecords) = getCategories(array(
'tableName' => 'nav',
'defaultCategory' => '', // Enter 'first', a category number, or leave blank '' for none
'categoryFormat' => 'onelevel', // showall, onelevel, twolevel
'ulAttributesCallback' => 'customMenuUlAttr', // ADVANCED: custom function to return ul attributes, eg: myUlAttr($category);
'liAttributesCallback' => 'customMenuLiAttr', // ADVANCED: custom function to return li attributes, eg: myLiAttr($category);
'selectedCategoryNum' => '0'
));
// Menu 2 (selected)
list($categoryRecords2, $selectedCategory ) = getCategories(array(
'tableName' => 'nav2',
'defaultCategory' => 'first', // Enter 'first', a category number, or leave blank '' for none
'categoryFormat' => 'onelevel', // showall, onelevel, twolevel
'ulAttributesCallback' => 'customMenuUlAttr', // ADVANCED: custom function to return ul attributes, eg: myUlAttr($category);
'liAttributesCallback' => 'customMenuLiAttr', // ADVANCED: custom function to return li attributes, eg: myLiAttr($category);
'selectedCategoryNum' => mysql_escapef(@$getRecord),
));
}
-aev-