Hiding root category and showing sub categories as

2019-04-17 04:48发布

see the image please. My site is located here

enter image description here

after shifting the domain, menu has messed up...I want to hide root category and I want to show sub categories as main menu. I want the sub sub categories as drop down menu ( these are already dropdown)

can somebody guide me how I can do it? any help please?

1条回答
家丑人穷心不美
2楼-- · 2019-04-17 04:50

There may be a couple of reasons for this to happen.

Reason 1 - incorrect category structure

  1. Your category structure inside the magento CMS needs to have all nav item categories coming from the root category. You may need to drag and drop them into the root category. See the screenshot below for an example:

enter image description here

Reason 2 - Theme changes

  1. In your current themes layout folder (app/design/frontend/PACKAGE/THEME/layout/) open page.xml.
  2. Find the section that starts with the this block opening:
    <block type="page/html_header" name="header" as="header"> and then check inside it for info about what template renders your menu. In the case below it's page/html/topmenu.phtml

    <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
    <label>Navigation Bar</label>
    <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
    </block>
    
  3. The theme you are using may be using a custom navigation template. Check the template which renders the top navigation: (app/design/frontend/PACKAGE/THEME/template/page/html/topmenu.phtml). The code should be as below:

    <?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
     <?php if($_menu): ?>
      <div class="nav-container">
        <ul id="nav">
         <?php echo $_menu ?>
        </ul>
      </div>
    <?php endif ?>
    
查看更多
登录 后发表回答