On 01.03.2011 15:46, Will Scheidegger wrote:
Dear Magnolians
Already my next stk / freemarker question that I could not answer with the help
of the documentation...
Let's say you have a localized title stored in the node datas "title_en" and "title_fr".
What's the correct way to output the right version now? If you have the current language somewhere (be that
in the site or whatever, for now just say in a variable "language") the best I could come up with is
${content['title_' + language]}
but I was kind of expecting to find a special Magnolia trick for this... or am
I missing something again?
Hi Will,
Simply use "${content.title}".
Magnolia "does" the trick ;-)
Content is a "wrapped" node, which take care of your current language.
HTH, Matteo
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------