[opencms-dev] Load templates dynamically
Daniel
daoquan at gmail.com
Wed Jul 6 05:43:01 CEST 2011
Choose different template file base on user agent.
<%
String ua = request.getHeader("User-Agent");
if(ua.indexOf("iPod")> 0 || ua.indexOf("iPad") > 0 ){
%>
<cms:include file="index-html5.jsp" cacheable="false" />
<%}else{%>
<cms:include file="index-flash.jsp" cacheable="false" />
<%}%>
2011/7/5 Mario Jäger <m.jaeger at alkacon.com>
> Hi,
>
> I am not sure if I understand your question right. Using the "template"
> property you can set a template quite dynamically.
>
> Kind Regards,
> Mario.
>
>
>
> Am 16.06.2011 11:04, schrieb R. Jonyo:
> >
> > Any one knows how to load templates dynamically on JSP?
>
>
> --
> -------------------
> Mario Jäger
>
> Alkacon Software GmbH - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110706/8cda9d40/attachment.htm>
More information about the opencms-dev
mailing list