|
Very minor thing, but links created by Mage_Cms_Block_Widget_Page_Link should be able to highlight themselves by adding a class if the current url is the same as the link in the Widget_Link.
You could extend this to check it a link was a “parent” by matching fragments of the url as well.
Makes building list of links for CMS pages much easier from a presentational point of view, has pretty much zero overhead as well…
/**
* Add “active” class to link if it matches this url
* @return string
*/
public function getClass()
{
$currentUrl = Mage::helper(’core/url’)->getCurrentUrl();
if($currentUrl == $this->getHref() ) {
return “active”;
}
return;
}
|