I didn’t mention the version because the site is currently on 1.x, but will be upgrading soon to 2.x, so the version was irrelevant. If this was something that could be done in 2.x, they could wait to do it after the upgrade. If it was 1.x, I was sure it would carry into 2.x.
The reason for wanting to order by a custom category field is because the category IDs are not in sequence, and the category names are not the alpha sequence desired either. The custom category field is simply a number “category_sort_order,” to designate way the categories should be sorted.
I can’t believe, in all this time I’ve used EE, that I never had a reason to sort by category before. I was just surprised that it couldn’t be done, and thought I must have missed something. That’s so strange!
The category, in this case, is used to define the product’s category (ie, classification). Not the actual example, but it is similar to something like: Clothing, Electronics, Groceries, etc. I can’t help but think that other people have wanted to display something like parts or orders lists, but have it sort according to the category, without breaks for category heading (which could be done using a category archive tag, but even then, you don’t have the ability to use all the fields in the weblog/channel).
I understand why it would be difficult for a exp:weblog/channel tag to be used to sort by category, but since I never had to do it before, was surprised it didn’t exist in some other tag/feature.
I would think this was about the most straightforward use of the Category function you could have. The only solution I can come up with then is to (essentially) duplicate the category as a drop-down weblog/channel field, put a number in front of the category name, so it sorts properly, such as 10-Category Name, 20-Category Name, etc. (leaving gaps for future insertions), and then go back through and add the value to every weblog/channel entry. Duplicate category as a custom field. Ugh.
<voice =“9 year old girl”>But I don’t wanna doooo that.</voice>
(You wouldn’t have in your back-pocket a handy little utility program that fetches matching channel_data, based on category, and allows you to update a channel data field would ya, Sue?)
Thanks, Sue.