Hi Jac,
Here is an example of how you can create a hierarchical menu system using a category section:
<?php
// load records from 'animal_category'
list($categories, $categoryMeta) = getCategories(array(
'tableName' => 'category_menu_section_name',
));
?>
<ul>
<?php foreach($categories as $category): ?>
<?php $isSelected = ($category['num'] == @$detailRecord['num']); ?>
<?php echo $category['_listItemStart']; ?>
<?php if ($isSelected) { echo "<b>"; } ?>
<?php echo $category['name']; ?>
<?php if ($isSelected) { echo "</b>"; } ?>
<?php echo $category['_listItemEnd']; ?>
<?php endforeach; ?>
</ul>
This is example code, so you'll have to make a few changes to get it working, specifically you'll have change category_menu_section_name to the name of your category menu section.
So I've used the getCategories function to retrieve the category menu items. This function will automatically generate list item start and end tags using the meta field _listItemStart and _listItemEnd.
I've also integrated the $isSelected variable, so the current menu item should be highlighted in bold.
Let me know if you have any questions.
Thanks!
Greg
Greg Thomas
PHP Programmer - interactivetools.com