3

I need help to modify a menu.

The problem is that I want submenu to be available on one category. But on the other top menus categories they should not show in the drop down from the top menu

(I can not disable them because they are in use in the sidebar navigation).

In the menu file for my theme this is the code:

<div class="nav-container">
<div class="container">
    <div class="row">
        <div class="col-xs-12">
            <ul id="nav" class="sf-menu">
                <?php echo $_menu ?>
            </ul>
            <div class="sf-menu-block">
                <div id="menu-icon"><?php echo $this->__('Categories') ?></div>
                <ul class="sf-menu-phone">
                    <?php echo $_menu ?>
                </ul>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>

I have also tried to modify Navigation.php with no success. My Magento knowledge is not 100%.

I have search forums but can not find exactly what I need. Any guidance would be appreciated.

=> EDIT:

Can it be in this file navigation.php?

    public function getCurrentChildCategories()
{
    if (null === $this->_currentChildCategories) {
        $layer = Mage::getSingleton('catalog/layer');
        $category = $layer->getCurrentCategory();
        $this->_currentChildCategories = $category->getChildrenCategories();
        $productCollection = Mage::getResourceModel('catalog/product_collection');
        $layer->prepareProductCollection($productCollection);
        $productCollection->addCountToCategories($this->_currentChildCategories);
    }
    return $this->_currentChildCategories;
}
  • Set the flag "Include in Navigation Menu " to "No" on the categories you don't want in the menu. – Marius Mar 18 '15 at 14:38
  • Thanks. But this will not help me because then the sub menu will also be disabled in my sidebar menu I have on each page. – user20309 Mar 18 '15 at 14:57
  • @user20309 that's not true, that are two different things. It will always be included in the left menu. The option is specific for the navigation menu(if your theme supports it_ – Jeroen Mar 19 '15 at 22:55
  • Allright, thank you for the information. Then I will focus on the sidebar extension that removes the subfolders when they are not active. WIll update you when I got better knowledge about the script! – user20309 Mar 20 '15 at 7:23
  • I changed the css file instead of the other files to hide the specific sub menus. – user20309 Mar 20 '15 at 9:21
1

If you want to hide it in the Navigation then see the image

enter image description here

  • Thanks. But this will not help me because then the sub menu will also be disabled in my sidebar menu I have on each page. – user20309 Mar 18 '15 at 14:57
  • I changed the css file instead of the other files to hide the specific sub menus. – user20309 Mar 20 '15 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.