Here is the code follow it:
<?php
$class = '';
if (Mage::getSingleton('catalog/layer')->getCurrentCategory()->getId() == $category->getId())
{
$class = ' class="active"';
}
echo '<li'.$class.'><a href="'.$cate.'">'.$category->getName().'</a></li>';
?>
Thanks!
Magento Group
<?php
$class = '';
if (Mage::getSingleton('catalog/layer')->getCurrentCategory()->getId() == $category->getId())
{
$class = ' class="active"';
}
echo '<li'.$class.'><a href="'.$cate.'">'.$category->getName().'</a></li>';
?>
Thanks!
Magento Group
Comments
Post a Comment
Feel Free To Ask...