cancel
Showing results for 
Search instead for 
Did you mean: 

Categories in template

ale_carraro
Champ in-the-making
Champ in-the-making
I need to list files contained in a specific category.

I wrote this template:
 <#list classification.getRootCategories("cm:generalclassifiable") as n>
   ${n.name}<br>
  <ul>
  <#list n.categoryMembers as i>
    <li>${i.name}</li>
  </#list>
  </ul>

</#list>
but now instead of looping through all root categories, I have to specialize it for a particular, hardcoded category. But I couldn't find a way to query categories by name or by path in Javascript Api. Is there a way?
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
Yes you can query in JavaScript using Lucene and by category path:
http://wiki.alfresco.com/wiki/Search#Category_Queries

Thanks,

Kevin

ale_carraro
Champ in-the-making
Champ in-the-making
Thank yow very much (again)!