Hi,
I am running a horizontal navigation menu at the top of my page and then another in the footer. The top navigation menu is using "showall" as the categoryFormat while the footer menu is using "onelevel". I am using the same table (navigation_menu) for both menus.
In the viewer URL of one section, the footer menu is behaving schizophrenically. For records 1, 4, 5, 6 it does a "showall" in the footer but for the other records it does a "onelevel" display. The code I am using for the footer navigation menu is below. Can you tell me why it sometimes displays all records and sometimes only one level?
<?php
// load records from 'navigation_menu'
list($navigation_menuRecords, $selectedNavigation_menu) = getCategories(array(
'tableName' => 'navigation_menu',
'categoryFormat' => 'onelevel',
'defaultCategory' => '',
// advanced options (you can safely ignore these)
'rootCategoryNum' => '',
'ulAttributes' => '',
'selectedCategoryNum' => '',
'ulAttributesCallback' => '',
'liAttributesCallback' => '',
'loadCreatedBy' => false,
'loadUploads' => true,
'ignoreHidden' => false,
'debugSql' => false,
));
?>
<?php foreach ($navigation_menuRecords as $categoryRecord): ?>
<?php if ($categoryRecord['target']) {
$target = 'target="';
$target .= $categoryRecord['target'];
$target .= '"';
} else {$target="";}
?>
<?php echo $categoryRecord['_listItemStart'] ?>
<a href="<?php echo $categoryRecord['page_url'] ?>" <?php echo $target;?>><?php echo $categoryRecord['name'] ?></a>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endforeach; ?>
Thanks
Terry