cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight Menu bar in Share

dsr471
Champ on-the-rise
Champ on-the-rise
Hi,

I have a small requirement in Alfresco-Share development. I'm using 4.0.e community version. My requirement is , In Share I configured my custom menu called "i-search" in menu bar. Now I want it to be highlighted with color when user is in that Page. How can I achieve this without disturbing other Menus. Please see attachment for Reference.

Anybody , suggest please…


Regards,

D S Reddy
2 REPLIES 2

aaditvmajmudar
Confirmed Champ
Confirmed Champ
Hi Reddy,

Check out for header.js file - setAppItems method.

Hope this helps.

s_palyukh
Star Contributor
Star Contributor
Hi Reddy,

I hope the following js example will help you (it works in 4.1.5):


var currentPageElement = YAHOO.util.Selector.query('a[href='+window.location.pathname+']');

if(currentPageElement.length>0) {
  
   var parentSpan = currentPageElement[0].parentElement;

   Dom.setStyle(parentSpan, "background-color","blue");

}