Post by kylelnsn » Tue Apr 10, 2012 12:39 am

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!

New member

Posts

Joined
Mon Apr 09, 2012 9:52 pm

Post by george_o » Tue Apr 10, 2012 1:27 am

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>

dropbox.com - 2GB free online storage.


User avatar
New member

Posts

Joined
Sun Jan 15, 2012 2:28 am
Who is online

Users browsing this forum: No registered users and 28 guests