Get list of Alfresco categories from WCMQS

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2010 03:44 PM
Hi,
I'm creating my custom web-site based on WCMQS.
I need to retrieve all available categories as a list from Alfersco repository. If somebody changes or adds new category I need to see changes in category list on my page.
Is there any way to retrieve a list of existing categories/subcategories from webscript? Can somebody give an example?
Thanks.
I'm creating my custom web-site based on WCMQS.
I need to retrieve all available categories as a list from Alfersco repository. If somebody changes or adds new category I need to see changes in category list on my page.
Is there any way to retrieve a list of existing categories/subcategories from webscript? Can somebody give an example?
Thanks.
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2010 10:25 PM
WCMQS gives a good example of how to do this for sections. When you say categories, do you mean repository taxonomy categories. If so you can write your own webscript to get a category list. I am not sure if alfrsco has made the categories available via the js library but if not you can always write the webscirpt as a java backed webscript. Once you have the node list of categories in the model you can then use a similar approach wcmqs uses forcreating dynamic menu based. see top.get.html.ftl for example using sections:
<#macro outputMenu sections> <ul> <#list sections as section> <#if ! section.excludeFromNav> <li><a href="${url.context}${section.path}"><#if section.title?? && section.title?length gt 0>${section.title}<#else>${section.name}</#if></a> <@outputMenu sections=section.sections/> </li> </#if> </#list> </ul></#macro><div id="myslidemenu" class="jqueryslidemenu"> <ul class="primary-menu"> <li><a href="${url.context}/" accesskey="1">${msg('nav.home')}</a></li> <#list webSite.sections as section> <#if ! section.excludeFromNav> <li><a href="${url.context}${section.path}" accesskey="${section_index+2}"><#if section.title?? && section.title?length gt 0>${section.title}<#else>${section.name}</#if></a> <@outputMenu sections=section.sections/> </li> </#if> </#list> </ul></div>

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2010 12:33 AM
Brian, thanks for reply!
When I say categories I mean categories managed from administration console in ALfresco.
In my web-site I'd like to have something like category tree in Share but I need list in my case.
When I say categories I mean categories managed from administration console in ALfresco.
In my web-site I'd like to have something like category tree in Share but I need list in my case.
