Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Proposed change in Mage_Page_Block_Html_Toplinks addlinks function
 
seldon
Sr. Member
 
Total Posts:  92
Joined:  2007-11-08
 

Hi, to enable a link to have an active/inactive state, could the method addLink in Mage_Page_Block_Html_Toplinks be changed as follows. Add an active boolean value:

function addLink($liParams$aParams$innerText$position=''$beforeText=''$afterText=''$active false)
,

and set it to the topLink:

$toplinkInfo['active'$active;

In this way, one could use css to make a link look differnet if it’s ‘active’.

Perhaps better though, is to include a piece of code, that compares the link to the controller/action that the user is browsing, in the addLink method of the Toplinks class. What do you think?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top