Thanks for the help. I'm closing in on the problem. Freemaker is
something we still have to get used to....
On 23.09.2009, at 19:39, Grégory Joseph wrote:
${def.i18nBasename} should work yeah;
On Sep 23, 2009, at 7:16 PM, Will Scheidegger wrote:
O.k., so ${content.i18nBasename} is of course crap, because the
i18nBasename is not defined in the content but the paragraph
definition. According to http://wiki.magnolia-cms.com/display/DEV/4.0+Templating+notes?focusedCommentId=18907323#4.0Templatingnotes-Freemarkersupport
this should be accessible with ${def}. But that's producing a
freemarker error too!?
Hm.... anyone any ideas how to debug this? Thanks!
Plug your debugger in
info.magnolia.freemarker.models.MagnoliaObjectWrapper and
info.magnolia.module.templating.freemarker.RenderableDefinitionModel
Additionally, check the various testcases for these classes, also
info.magnolia.freemarker.FreemarkerHelperTest.
Feel free to add a test to
info.magnolia.module.templating.freemarker.RenderableDefinitionModelTest
to demonstrate it works or doesn't work.
-g
On 23.09.2009, at 18:47, Will Scheidegger wrote:
I did some more research in the meantime... only to get more
questions! I added the following to my freemarker template:
i18n: ${i18n}<br />
ctx: ${ctx}<br />
ctx.locale: ${ctx.locale}<br />
i18n -> 'form.fieldset.editLabel': ${i18n
['form.fieldset.editLabel']}<br />
i18n -> 'form.fieldset.newLabel: ${i18n['form.fieldset.newLabel']}
<br />
content: ${content}<br />
What I'm getting is:
i18n: info.magnolia.freemarker.messageswrap...@7a5291d9
ctx: info.magnolia.context.webcontexti...@42e57c4c
ctx.locale: de
i18n -> 'form.fieldset.editLabel': ???form.fieldset.editLabel???
i18n -> 'form.fieldset.newLabel: New Fieldset
content: 0
Questions:
- Why does ${content} return "0" and ${content.i18nBasename} an
error? According to http://documentation.magnolia-cms.com/reference/freemarker.html
this should work
- Why does one i18n key work and the other does not although both
are in the strings file -> seems like a pebcak problem to me, but
could not figure it out so far
-will
On 23.09.2009, at 17:39, Will Scheidegger wrote:
Dear Magnolians
The Form module freemarker templates contain i18n placeholders
like this one:
${i18n['form.fieldset.editLabel']}
What do I have to do in my jsp templates in order for these
placeholders to work? Do I have to set a locale somewhere?
Thanks for the insight!
-will
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------