Re: [Jason] display root category name
If i build my whole site's navigation into this category group, making one branch for the food menu (depth 0 as shown above with sandwiches etc), then how would i display a nested ul for just this one branch? (for side navigation on this particular food menu page)
originally, I had:
<?php foreach ($categoryRecords as $categoryRecord): ?>
<?php echo $categoryRecord['_listItemStart'] ?>
<?php if ($categoryRecord['_isSelected']): ?>
<b><?php if (!$categoryRecord['_hasChild']):?><a href="<?php echo $categoryRecord['_link'] ?>"><?php endif; ?><?php echo $categoryRecord['name'] ?><?php if (!$categoryRecord['_hasChild']):?></a><?php endif; ?></b>
<?php else: ?>
<?php if (!$categoryRecord['_hasChild']):?><a href="<?php echo $categoryRecord['_link'] ?>"><?php endif; ?><?php echo $categoryRecord['name'] ?><?php if (!$categoryRecord['_hasChild']):?></a><?php endif; ?>
<?php echo $categoryRecord['_listItemEnd'] ?><?php endif; ?>
<?php endforeach; ?>
that works fine. but now, of course when i add other depth zero branches for home, about us, contact us etc. They are added into this side nav on the food menu page. I tried wrapping parts in <?php if ($categoryRecord ['num']==23): ?> , 23 being the record number for the "menu" category, but couldn't figure out how to get the children to display.
thanks again.