<?php $currentUrl = Mage::helper('core/url')->getCurrentUrl(); // get current url
<?php $url = $category->getURL(); ?>
<li class="<?php if ($currentUrl == $url) {echo 'active';} else{echo '';} ?> dropdown megamenu-fw "></li>
I'm trying to make a condition in li tag on class if the current url equal to current li url then add the class active but it is not working.