[opencms-dev] Locale macro in XSD schema

Arturo Martín Lladó arturo.martin.llado at gmail.com
Mon Feb 18 12:13:20 CET 2013


Hi, Paul:

Are you able to offer (with your categories taxonomy) a CategoryWidget
dialog using this kind of configuration?

<layout element="CategoryExample" widget="CategoryWidget"
configuration="category=/__LOCALE__/_categories/Example/"/>

Obviously, __LOCALE__ (and with this, the category under the user
would search) must change when the user tries to edit the content
using another locale.

I believe the problem would be the same, both using
/__LOCALE__/_categories/ or /_categories/__LOCALE__ as configuration
value.

Regards.

2013/2/18 Paul-Inge Flakstad <flakstad at npolar.no>:
> Hi Arturo,
>
> Sorry I'm not answering your question per se, but I'm just curious; *must* your categories be organized like /sites/default/_categories/__LOCALE__/?
>
> We do have a multi-language site and use categories, but have organized them this way: /sites/default/__LOCALE__/_categories/. To me, this seems to be the most convenient approach.
>
> The downside:
> The categories must be defined separately for each locale. In our case the category folders must have identical names, to enable easy switching between languages. (So in other words, everything should be identical, except for the Title property.)
>
> The upside:
> It works like you want it to (I think). The categories are localized to the correct language both in the widget when editing pages and on the screen when viewing the site.
>
> A live example from our site:
> http://www.npolar.no/en/news/. Category filters to the right. Language switch next to the site search (the flag icon).
>
> Cheers,
> Paul
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Arturo Martín Lladó
> Sent: 15. februar 2013 14:27
> To: The OpenCms mailing list
> Subject: [opencms-dev] Locale macro in XSD schema
>
> Hi, list.
>
> Is there available any locale macro for using it in XSD schemas?
>
> I'd like to do something like this:
>
>         <layouts>
>                 [...]
>                 <layout element="Categoria" widget="CategoryWidget"
> configuration="category=/_categories/__LOCALE_MACRO___/tipoDocumento/|onlyleafs=true"/>
>         </layouts>
>
> This is because our categories tree is organized this way:
> /sites/default/_categories/__LOCALE__/...
>
> Kind regards.
>
> --
> Arturo Martín Lladó
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



-- 
Arturo Martín Lladó



More information about the opencms-dev mailing list