Sorting taxonomy results....

Jul 20, 2011 at 5:52 PM

How can I sort the resulting content items based on something other than the current sort order.
For instance, if I have a taxonomy named Categories and the list for the term France is displayed, is it possible to sort the resulting Content Items by title?


Jul 28, 2011 at 9:43 PM


bump.... this is also something I am trying to achieve!  Taken a look at the source and it looks to use the CommonPart, wasn't sure how to go about customizing it for different ordering.


Jul 28, 2011 at 9:51 PM

Yeah this is defined in code right now. And I think appart from changing this code, you will have to wait for next Orchard version which will include a new Projections module, allowing to customize and create content queries.

Jul 29, 2011 at 3:40 AM
Edited Aug 17, 2011 at 5:51 AM

Thanks, I just hardcoded it for now.

Ill read up on the upcoming Projections Module, Im looking for something to allow me to filter items based on multiple taxonomy values.

Aug 19, 2011 at 3:05 PM

Hello FrankyD, I just encountered the same need (i.e. the ability to sort as you have requested). Are you willing to share how you "hardcoded" it (either share the code or point me to the file you modified)?  Were you able to do this by overriding the view or did you have to modify the Taxonomies module (i.e. modify the code)?  Thanks for any assistance you can provide.

Oct 3, 2011 at 10:54 PM

I'd be interested in knowing how to modify the sort as well.  I have two taxonomies on a type that I'd like to order by.  Thnx

Jun 27, 2012 at 8:41 AM

Does anybody have an answer on how to sort the resulting list ?

I have no idea how the sort is being set.. I am using the latest version of taxonomy module and the latest version of orchard

Jun 27, 2012 at 3:55 PM

The way I've been doing it is with a projection query.  Let me know if you need help with it.

Jun 27, 2012 at 6:39 PM

Could you explain what you did ?

I could make a projection page, but I want to use the taxonomy page ( for a termpart ) so that will be the container for the items that have that term..

taxonomy: newsoptions

term 1: product1, url: /product1/news/

term 2: product2, url /product2/news/

and then the news items have one of 2 the terms...

Where would I use the projection ??

Jun 27, 2012 at 7:02 PM

Let's forget the URL for a second.  Take a look at Bertrand's video first... this should help a lot.

The gist of it is that you'd create a query first that would get all the taxonomy items you'd like to display.  The query will also sort them how you'd like to display them.  Then you can use a projection widget to display the query on any page you'd like. 

Oct 10, 2013 at 4:42 PM
I'm still struggling with this too.
I can understand that the taxonomies can be sorted through a query and projections. But items that i have assigned a taxonomy term (i.e. Products)?
I have a taxonomy Productcategories and Products with a Productcategorie term attached to them.
How can i sort the products within each Productcategorie without specifying a query for each taxonomy term?
I hope i have made myself clear on this.
Oct 10, 2013 at 4:49 PM
You can use Has Terms filter, then add a sort criterion on a product's property.

Sent from my Windows Phone

Oct 14, 2013 at 10:54 AM
Hi Sebastien, thanks for the reply. I can use Has Terms indeed but can you point me into a direction where i can dynamically put the term in a query, because i don't want to make a new query for each ProductCategory.
This is why i'd like to see some kind of sorting of the content items attached to a taxonomy term (i use the taxonomy item now to display the taxonomy and the contained 'Product' items). I could live with creating individual queries now, but in a system where contentmanagers can add their own Taxonomies(Categories) this is not desirable.
Jan 28, 2014 at 1:07 AM
Edited Jan 28, 2014 at 3:38 AM
Hi Gents,

I've just tried sorting Content Items on a Taxonomy using version 1.7.2 using a query in relation to sorting the items. I'm requiring some advice on this?
  1. Is there a Parts.Terms.List.cshtml with the Taxonomy module?
  2. Can I explicitly identify fields within an defined content type and associate it with model.ContentItems
  3. Can I then override the default terms sort order?

Do I use Tokens, Slugs and Projections?

Thanks PK
Mar 4, 2015 at 10:21 AM
I think it would be good if the Taxonomy had a sort setting (applying to the content items of its terms - not the terms themselves) where you could select from one of
  1. Created
  2. Modified
  3. Published
  4. Display Text
Something similarl to list sorting (see the container service)?