Problems when using text.format
Hi there
I defined some custom language keys e.g. some.text = "lorem ipsum" in two different languages.
In the code I'm trying to get the value by:
text.format{"some.text"}
Now the funny thing is, is that when I use text.format it works at some part in a custom component and in some other I get a
Expected hash. text evaluated instead to freemarker.template.SimpleScalar on line 117, column 23 in preview. The problematic instruction: ---------- ==> ${text.format("some.text")} [on line 117, column 21 in preview] ----------
error.
Has anyone any clue what this could be as it is driving me nuts.
Thanks!
chris
Are you assigning a value to the varible "text" elsewhere in your code, perhaps in one of the macros you've created? If so, I'd suggest renaming the variables you're using because you're likely overwriting the "text" custom context object that already exists. Alternately, you could create a namespace for your macros, which might help prevent them from overwriting your main namespace variables:
http://freemarker.sourceforge.net/docs/dgui_misc_namespace.html