sorting categories

4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 16, 2011   (RSS)

By rez - August 12, 2011 - edited: August 12, 2011

My category editor says, "globalOrder" for sorting. ASC doesnt seem to work in there?

How do I sort a category list alphabetically on the viewer?
When i try:
'orderBy' => 'name ASC'
I get:

Category Viewer (category) errors
Unknown option 'orderBy' specified
Valid option names are: (tableName, useSeoUrls, debugSql,... etc


guessing it's something to do with the fact that there are depths? I want them all a-z.

thanks, happy friday.

Re: [rez] sorting categories

By Jason - August 12, 2011

Hi,

You're right, because the category menu is a hierarchical structure, we don't provide an easy way to sort them through getCategories. For example, if you were to sort all of your categories by name, how would that affect the parent/child relationships?

The simplest option would be to sort them inside CMS Builder. If you manually sort the top level categories, all of their child records will be moved along with them.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [rez] sorting categories

By Jason - August 16, 2011

Hi,

This could be accomplished with some custom code, but it would go beyond what we're able to handle in the forum. If you'd like to look into getting this done, please email consulting@interactivetools.com and we can go over some options.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/