Re: [efi-revivo] Help with category dropdown
Hi efi-revivo,
I'm not absolutely clear on what you want to do but it you are using the built in category-to-menu feature of cmsb then you can use the following to create the menu:
<ul>
<?php foreach ($allCategories as $category): ?>
<?php echo $category['_listItemStart'] ?>
<?php if ($category['_isSelected']): ?>
<b><a href="<?php echo $category['_link'] ?>"><?php echo $category['name'] ?></a></b>
<?php else: ?>
<a href="<?php echo $category['_link'] ?>"><?php echo $category['name'] ?></a>
<?php endif; ?>
<?php echo $category['_listItemEnd'] ?>
<?php endforeach; ?>
</ul>
This uses the array created by the following:
list($allCategories, $selectedCategory) = getCategories(array(
'tableName' => 'product_categories', // put the category table name here
'categoryFormat' => 'onelevel', // showall, onelevel, twolevel, breadcrumb...
));
Which should be placed above the menu in the code (normally at the start of the page).
If this isn't what you're looking for please do let me know - if you can provide a link to the site and attach the code you're using that would be helpful.
Hope this helps,
Tom