[opencms-dev] include tag problem

Pavel Peringer pavel.peringer at qbizm.cz
Sat Aug 12 13:42:18 CEST 2006


Hello

I am using param too with cms.include ("function" for tag <cms:include>):

Map params = new HashMap();
params.put(name, value);
cms.include(file, element, params);

in jsp get value with request.getParameter(name);

cms.getRequestContext().getLocale() returns locale defined on resource, 
ie you have one english site so set property locale = en, another in 
french so set locale = fr and cmsRequest returns this value, not 
parameter value from parent jsp.

HTH

Pavel Peringer

> Hi guys.
>
> Have a little problem here.
>
> Have a template file that contains this lines:
>
> <cms:include page="../elements/promo_block.jsp">
>
> <cms:param name="__locale">en</cms:param>
>
> </cms:include>
>
> And element file that contains:
>
> org.opencms.jsp.CmsJspActionElement cms =
>
> new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);
>
> String locale = cms.getRequestContext().getLocale().toString();
>
> out.println(locale);
>
> Locale appears not “en”, and content from file is displayed in another 
> language that English.
>
> Locale “en” properly added to locales list in config file.
>
> What’s the problem?
>
> Thanks, Yuri.
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>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
>


-- 
Pavel Peringer                              Qbizm technologies, a.s.
programator                                 ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz    www.qbizm.cz      www.qbizm-services.cz




More information about the opencms-dev mailing list