Page 1 of 1

Remove 2nd Tier Drop Down

Posted: Tue Apr 10, 2012 12:39 am
by kylelnsn
Hi,

I have been setting up my store, with the default theme. I want to stop sub categories show in the top menu as a drop down. Is there any easy way to do this?

Just comment out some code?

Cheers!

Re: Remove 2nd Tier Drop Down

Posted: Tue Apr 10, 2012 1:27 am
by george_o
Edit catalog/view/theme/your_theme/template/common/header.tpl
Find:

Code: Select all

<div id="menu">
  <ul>
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
      <?php if ($category['children']) { ?>
      <div>
        <?php for ($i = 0; $i < count($category['children']);) { ?>
        <ul>
          <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
          <?php for (; $i < $j; $i++) { ?>
          <?php if (isset($category['children'][$i])) { ?>
          <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
          <?php } ?>
          <?php } ?>
        </ul>
        <?php } ?>
      </div>
      <?php } ?>
    </li>
    <?php } ?>
  </ul>
</div>
Replace with:

Code: Select all

<div id="menu">
  <ul>
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
    <?php } ?>
  </ul>
</div>