sorting by order asked many times in this forum but i couldn't relevant topic for my question and here i am. I have a MultiNodePicker and I want to access to the SortOrder property. When I use:
id="@contentItem.SortOrder"
It is giving me order of the category and at the end i am having IDs like 2, 8, 9, 12, 3
I would like to sort these nodes by the order in MultiNodePicker like 1, 2, 3, 4, 5, 6
Is this possible? or would it be possible to tell razor give id numbers starting from 1 to 6?
Sorting by MultiNodePicker
hi,
sorting by order asked many times in this forum but i couldn't relevant topic for my question and here i am. I have a MultiNodePicker and I want to access to the SortOrder property. When I use:
id="@contentItem.SortOrder"
It is giving me order of the category and at the end i am having IDs like 2, 8, 9, 12, 3
I would like to sort these nodes by the order in MultiNodePicker like 1, 2, 3, 4, 5, 6
Is this possible? or would it be possible to tell razor give id numbers starting from 1 to 6?
Best,
Hi Kadir
What version of Umbraco are you using? Is it 4.11 with MVC enabled or?
Usually I think people would use OrderBy to achieve the above but if you're using MVC Razor then it might be a different story. Otherwise have a look at the OrderBy examples here http://umbraco.com/follow-us/blog-archive/2011/3/1/umbraco-razor-feature-walkthrough-%E2%80%93-part-4
/Jan
Thank for the information. I am using 4.9.0. Maybe i should spend more time on these walkthroughs and come back later :)
is working on a reply...