Return to Snippet

Revision: 58110
at June 26, 2012 19:40 by luxmedia


Initial Code
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
    <ul id="nav">
        <?php foreach ($this->getStoreCategories() as $_category): ?>
            <?php if(stristr('YOURID1,YOURID2,YOURID3', $_category->getId()) === FALSE)   : ?> 
                <?php echo $this->drawItem($_category) ?>
            <?php endif ?>
        <?php endforeach ?>
    
        <?php// echo $_menu ?>
    </ul>
</div>
<?php endif ?>

Initial URL
http://www.magentocommerce.com/boards/viewthread/55533/#t175320

Initial Description
Manually print out a category-navigation in a magento frontend template. within "stristr" you can enter an array of category-ids that should be hidden from display.

Initial Title
Magento - Print out a category navi with hiding specific categories

Initial Tags
navigation, magento

Initial Language
PHP