AnsweredAssumed Answered

[SOLVED]FreeMarker function error.

Question asked by libman on Dec 5, 2008
Latest reply on Dec 8, 2008 by libman

I am working on a FreeMarker function. It will get the name of the file which is under "Company Home/Backup". There will only be one Backup space name.

My function:
<#function getBackupDirNameobject>
<#if object.parent?exists>
   <#return getBackupDirName(object.parent)>
My problem is that it returns a noderef and not the name (so I have no error or warning by console). When executing the following, I get an error:
<#assign x = getClientName(object)>
Expected hash. x evaluated instead to freemarker.template.SimpleScalar on line ..
Where in the corresponding line I ask ${}.It is right that I get an error, but how can I otherwise show the property name (if I didn't program the function wrong)?
I have a loop of objects, where each as "object" and I am able to succesfully show the name of the objects (cm:content) with ${}.

Thanks by advance.