AnsweredAssumed Answered

Getting a list of spaces under a specified web project

Question asked by cmorrison on Sep 28, 2009

I'm using alfresco 3.0 community and trying to programatically get a list of folders under 'Company Home/Web Projects/MyWebProject'.  I am trying to do this in freemarker which will run when a webform generates its renditions.

Here is a list of my failed attempts:
<#list companyhome.childrenByXPath["*[@cm:name='Web Projects']/*[@cm:name='MyWebProject']/*"] as child>
<#list companyhome.children as child>
<#list companyhome.childByNamePath["Web Projects/MyWebProject"].children as child>
<#list avm.webappsFolderPath["MyWebProject"].children as child>
<#list avm.lookupNode("/").children as child>
<#assign search="TYPE:\"{}webfolder\""><#list companyhome.childrenByLuceneSearch[search] as wp>

Within the list I was outputting ${} to see if I could get it to work.  All the attempts above either failed with an error message or didn't generate any output.

A lot of these come from mixing up examples on these two pages:

I also tried the code from this page verbatim just to see if I would get any nodes listed under MyWebProject/:

Still no luck.  Can someone point me in the right direction or point out my flaw with the above.