RE: Manually setting the order of Categories within Category Navigation wid

thumbnail
Nick Burton, modified 5 Years ago. Junior Member Posts: 51 Join Date: 7/13/14 Recent Posts
Hello,
I am using Liferay 7.3 GA2.

I would like to manually set the order of a Vocabularies Categories within Category Navigation widget.
I can manually sort the vocabularies themselves within the configuration of the widget, but the listed categories will only display in alphabetical order.

If this cannot be done, can anyone think of a work around?

Thanks.

Best wishes, Nick.
thumbnail
Krzysztof Gołębiowski, modified 5 Years ago. Liferay Master Posts: 549 Join Date: 6/25/11 Recent Posts
Hi Nick,
I used to do these kinds of things in ADT in the past. I checked 7.3 GA4 and it seems there are no new configuration options for this portlet, so I think the only way to go is still custom sorting code in the freemarker ADT.
Best,
KG
thumbnail
Nick Burton, modified 5 Years ago. Junior Member Posts: 51 Join Date: 7/13/14 Recent Posts
Thanks, KG. As long as I can do it, then I’m relieved.  You wouldn’t  have an example of your ADT code would you?Don’t worry if you haven’t  Thanks again.  
Best wishes, Nick. 
thumbnail
Nick Burton, modified 5 Years ago. Junior Member Posts: 51 Join Date: 7/13/14 Recent Posts
The ADT will only allow me to pull in the data using the following script ...
${assetCategoriesNavigationDisplayContext}

I need to order the categories that are pulled into the page in a set (manual) order.
I'm not certain how I would do that in the ADT without being able to see the individual categories.
Sorry, probably obvious, but I just cannot figure it out. :-(
BW, Nick.
thumbnail
Krzysztof Gołębiowski, modified 5 Years ago. Liferay Master Posts: 549 Join Date: 6/25/11 Recent Posts
The default Liferay editor doesn't give you many options but there are a lot of ADT examples in Global scope. Check out the "Multi Column Layout" for Category Navigation Widget, which properly enumerates all the Vocabularies and Categories. That should allow you to do the sorting using Freemarker sequences.
KG
thumbnail
Nick Burton, modified 5 Years ago. Junior Member Posts: 51 Join Date: 7/13/14 Recent Posts
Thanks, KG.That looks to give me all the parts that I need, I will give that a try.
Have fun.  Best wishes, Nick.