[opencms-dev] include tag problem
Y. Glebov
yglebov at eclipse-sp.com
Mon Aug 14 08:33:50 CEST 2006
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Christian Steinert
Sent: Sunday, August 13, 2006 8:03 PM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] include tag problem
Y. Glebov schrieb:
> Hello, thanks for the answer, but still
>
> I need to display a page in locale, that differs from locale of all other
> elements on this page, how can I define it?
>
> Yuriy.
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Pavel Peringer
> Sent: Saturday, August 12, 2006 2:42 PM
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] include tag problem
>
> 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.
>>
The alkacon docs have an example on this as part of the explanation of
cms:include. Quote:
_________________
<cms:include attribute="body">
<cms:param name="__locale"><%= locale %></cms:param>
</cms:include>
___________________
Thanks but I've seen it before.
This code doesn't works. <% String locale = "en"; %> but still no changes.
Loaded element has another locale.
Yuri.
More information about the opencms-dev
mailing list