Nils Breunese wrote:
> Тимофей Самарский wrote:
>
>> Is it possible to get access to, for example, [b]server > i18n > content >
>> fallbackLocale[/b] value from ftl?
>
> You could use cmsfn.nodeByPath("/server/i18n/content/fallbackLocale",
> "config"). The cmsfn variable gives access to an instance of the
> TemplatingFunctions class.
>
> https://documentation.magnolia-cms.com/display/DOCS/Tag+libraries
Just noticed that fallbackLocale is a property, so you'd do something like this:
cmsfn.nodeByPath("/server/i18n/content", "config").fallbackLocale
I'd recommend against putting too much logic in templates by the way. Better
use a model class for that.
And maybe what you're trying to do with i18n can be solved more elegantly with
functionality already offered by Magnolia. What are you trying to accomplish
exactly?
Nils.
----------------------------------------------------------------
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------