Modify bootstrap dropdown menu so child items appear as list page

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 12, 2016   (RSS)

By JeffC - January 12, 2016

Hi

I am using the standard bootstrap nav css to display a category menu structure created in cmsb.

<span class="navbar-brand"><?php echo htmlspecialchars($website_config['website_name']) ?>
</div> 
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<?php foreach($categories as $category): ?>
<?php echo $category['_listItemStart']; ?>      
<a href="<?php echo $category['_link']; ?> "  <?php if($category['_hasChild'] && $category['depth'] == '0'): ?>class="dropdown-toggle" data-toggle="dropdown"<?php endif; ?>  >
<?php echo $category['name']; ?> <?php if($category['_hasChild'] && $category['depth'] == '0'): ?><span class="caret"></span><?php endif; ?></a>
<?php echo $category['_listItemEnd']; ?>
<?php endforeach; ?>

This standard code shows parent items with child items as a drop down.

Please could some one assist me to rewrite the above so that the nav menu shows the parent only, with the parent linking to a separate list page containing the child links.

I understand how list and detail pages work, but I am confused by category menus! 

Jeff