AW: [opencms-dev] Getting the tempalte name in JSP

Nick Panienski panienski at codecentric.de
Wed Mar 8 14:56:46 CET 2006


Thanks, sounds promising!

But how do I access the parameter passed by the cms:param tag in the
navi.jsp? Using a c:out to see if the value is passed correctly didnt
work...

> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von 
> shishank.mathur at wipro.com
> Gesendet: Mittwoch, 8. März 2006 13:26
> An: opencms-dev at opencms.org
> Betreff: RE: [opencms-dev] Getting the tempalte name in JSP
> 
> 
> Hi,
> 
> Here is what you can do:
> 
> Get the template name in your template by reading the "Template"
> property and then pass it as a parameter to nav.jsp which 
> then decides based on the template value what needs to be shown.
> 
> <%
> CmsJspActionElement action=new
> CmsJspActionElement(pageContext,request,response);
> String templateName = action.property("Template"); %>
> 
> Then while calling nav.jsp
> <cms:include file="../elements/nav.jsp">
>     <cms:param name="templateName"><%= template%></cms:param> 
> </cms:include>
> 
> Hope this helps.
> 
> Thanks
> 
> Cheers,
> Shishank
> 
> http://www.pcmspace.com
> 
> 




More information about the opencms-dev mailing list