Developer forum

Forum » CMS - Standard features » Order by field in item list with item publisher

Order by field in item list with item publisher

Roald Haahr Jensen
Reply

Using v8.9.2.21, I have a situation where I need to order by a value that is located within an entry of an item list on a page. Is that possible?

/ Roald


Replies

 
Nicolai Pedersen
Reply

You can use a Razor template and get the list of items in a collection, i.e. IEnumerable. Then you can use a LINQ statement to sort them by any of the properties of the items.

There are some examples here: http://doc.dynamicweb.com/forum/templates/razor-groups-orderby-with-linq

 

You must be logged in to post in the forum