-
Bug
-
Resolution: Won't Do
-
Neutral
-
None
-
4.4.2
-
None
The "specificities" (see http://documentation.magnolia-cms.com/reference/templating/freemarker.html#WorkingwithMagnoliacontent) of how Magnolia handles content objects in Freemarker templates break all access to regular methods of the java object since the dot-notation is pretty much kidnapped and only node datas are returned. To "fix" that, special content properties starting with @... were introduced.
It would been cleaner if the "@..." notation would have been used for accessing jcr attributes (i.e. node datas) and the rest would behave normally, so
${myContent.class} should return the Class object my calling the getClass() method.
${myContent.@class} should return the JCR attribute named "class"
Of course this might be my personal preference, but fact is that I cannot call the getClass() method the way the wrapper ojbect works now but you could get both (JCR attribute and method()) the other way around.