AnsweredAssumed Answered

displayPath showing inconsistent value

Question asked by sandramokeeffe on Jul 6, 2010
Hi,

I have a web script that essentially looks up a particular folder and displays the name, displayPath of each folder/file within it.

From what I can tell, displayPath should contain the path up to but not including the name.  However, on my machine it displays in the following format.

testsite–admin:/www/avm_webapps/ROOT.war/kaptest.com

where kaptest.com is the name of the file.

On a different machine for the exact same web script, the display shows correctly, i.e.

/www/avm_webapps/ROOT.war

The only difference that I can see is one Alfresco version is 3.2 and the other (mine) is 3.2r

In the webscript, the JS files set the node in the model.  I printed out the displayPath for each child of the node here and it displays correctly.  i.e.  /www/avm_webapps/ROOT.war

However, when it is printed out in the rendition template, the value has changed.

Below is what the rendition template does.

<items>
<#list node.children as child>
  <item>
     <name><![CDATA[${child.name}]]></name>
     <#if child.isContainer == true>
         <isFolder>true</isFolder>
     </#if>
     <#if child.isContainer != true>
         <isFolder>false</isFolder>
     </#if>
     <path><![CDATA[${child.displayPath}]]></path>  
  </item>
</#list>
</items>


Any help would be much appreciated.

Thanks in advance,
Sandra

Outcomes