[opencms-dev] cms.include function

Tim Howland thowland at organic.com
Mon Sep 27 20:45:30 CEST 2004


I believe you can do this with the JSTL tag library- look at the Core
tags.
 
 
<%-- Declare the core library --%>
    <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
    
    <%-- Simple if conditions --%>
    <c:if test='${param.p == "someValue"}'>
    <cms:include ...>        
    </c:if>
    
check out http://javaalmanac.com/egs/javax.servlet.jsp.jstl.core/if.html
 
Tim

  _____  

From: Ayvid B [mailto:ayvid_bh at rediffmail.com] 
Sent: Monday, September 27, 2004 2:30 PM
To: The OpenCms mailing list
Subject: [opencms-dev] cms.include function




Hi

I want to use cms.include function with the paramater as the jsp file
name but with the conditional if statement around the cms.include.

For example: 

if(condition x)
    cms.include("file1.jsp")
elseif(condition y)
    cms.include("file2.jsp")
else
  cms.include("file3.jsp")

Could anyone please let me know if this is possible or not.If not then
what could be the other option.

Thanks,
Ayvid





 <http://clients.rediff.com/signature/track_sig.asp>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040927/0a31be14/attachment.htm>


More information about the opencms-dev mailing list