[opencms-dev] Example template with tree menu

Antonio Cordeddu antoniocordeddu at coranto.it
Fri Oct 29 13:16:02 CEST 2010


Hi Allan,

I use this solution to change the class in a menu item:

<%
org.opencms.jsp.CmsJspActionElement cms = new 
org.opencms.jsp.CmsJspActionElement(pageContext, request, response);
String navInfo = cms.property("NavInfo", "parent") != 
null?cms.property("NavInfo", "parent"):"";
%>
<li <% if (navInfo.equals("myItem")) {%> class="active"<%}%>></li>

Before to run the code you have to assign to the property 'navinfo' of 
your file the right value.

Let's me know if this is useful for you.

Kind Regards

Antonio Cordeddu

______________________________________
Coranto informatica di Antonio Cordeddu
www.coranto.it
___________________________________________





More information about the opencms-dev mailing list