我正在使用 Hellowired 主题,顶部导航链接显示在侧栏中。相反,我希望在侧边栏中显示特定类别(ID 3)的子类别。请记住,当用户通过链接导航时,活动非活动状态应该起作用。
这是 leftnav.phtml 中的代码:
<div class="block block-leftnav">
<div class="block-title"><strong><span><?php echo $this->__('Shop Categories') ?></span></strong></div>
<div class="block-content">
<ul id="leftnav">
<!-- HOME BUTTON HACK -->
<?php $_anyActive = false; foreach ($this->getStoreCategories(3) as $_category) { $_anyActive = $_anyActive || $this->isCategoryActive($_category); } ?>
<li class="home <?php echo !$_anyActive ? 'active' : '' ?>"><a href="<?php echo $this->getUrl('')?>"><span><?php echo $this->__('Home') ?></span></a></li>
<!-- HOME BUTTON HACK -->
<?php foreach ($this->getStoreCategories(3) as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
</div>
</div>
帮助表示赞赏。先感谢您。