Get a list of pages, and sort it on a pre-value in Razor
Hi,
How would I sort a list of pages based on a prevalue instead of the text in Razor?
I created a dropdown datatype, and added items. Each item has a text and a value. I added the dropdown datatype property to a documenttype. and now I want to show all items sorted by the value of the datatype, instead of the text.
Lets say I have a documentType 'Instructor' with a property 'Level' (which is a dropdown)
In code I would have something like:
var items = root.Descendents("Instructor").OrderBy("Level");
This will sort the items based on the level, where level is the text of the prevalue.
Get a list of pages, and sort it on a pre-value in Razor
Hi,
How would I sort a list of pages based on a prevalue instead of the text in Razor?
I created a dropdown datatype, and added items. Each item has a text and a value.
I added the dropdown datatype property to a documenttype. and now I want to show all items
sorted by the value of the datatype, instead of the text.
Lets say I have a documentType 'Instructor' with a property 'Level' (which is a dropdown)
In code I would have something like:
var items = root.Descendents("Instructor").OrderBy("Level");
This will sort the items based on the level, where level is the text of the prevalue.
But I want to sort it based on the value.
Thanks in advance,
Patrick
is working on a reply...