Intechnic
Users Developers
Home / Forums / In-Portal CMS / Need Help! / How to customize active menu ? / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

How to customize active menu ? (3)


Posted: 12/21/2012 4:37:32 AM

Reply Quoted  


Hi
I'm working on a website using In-Portal CMS.
What I'm trying to do is to customize the menu depending on which page we are.

For example if my menu got 2 items "page1" and "page2".
When I click on "Page1" to go to this page, I would like that the "Page1" on the menu be in another color than the "Page2". So the user will quickly know on which page he is.


Thanks for you help or advices.


Posted: 12/21/2012 4:50:06 AM

Reply Quoted  


Hi
Phil helped me to figure that out.
Here is the solution :

you have to add [CODE]<inp2:m_if check="m_Param" name="active">active</inp2:m_if>[/CODE]

Example here is the code for my menu :
[CODE]<ul class="clearfix">
<li class="<inp2:m_if check="m_Param" name="active">active</inp2:m_if>">
<inp2:st_CachedMenu render_as="menu_element" category_id="1"/>
</li>
</ul>[/CODE]

Then you juste have to add the css style to your li.active, and it'll be done :-)

Posted: 12/21/2012 9:49:41 AM

Reply Quoted  


Thank you for sharing your findings!

Cheers and Happy Holidays!