Sharing is helping.

We offer you this space to share your knowledge about Magento and learn from our experienced customers.


    I have been trying to add a button in top.phtml in the same way that the home button is created by copy pasting:
    <!-- HOME BUTTON HACK -->

    <?php $_anyActive = false; foreach ($this->getStoreCategories() as $_category) { $_anyActive = $_anyActive || $this->isCategoryActive($_category); } ?>
    <li class="home <?php echo !$_anyActive ? 'active' : '' ?>">getUrl('')?>"><span><?php echo $this->__('Home') ?></span>
    <!-- HOME BUTTON HACK -->

    and giving it a new name. It works but both the home button and the new button are selected at the same time when I click one of them. Can I change the code to allow them being selected appropriately ?