Control sort order for related media types
In Sitefinity 7.1, I built a dynamic module with Module Builder. I included a Related media field to store images. As I programmatically add images to the Related media field, I'd like to be able to control the default sort order, so that when I retrieve my list of related images from the dynamic object they will be ordered in the way that I would like (not necessarily the order in which I inserted them). Is there a field or attribute that I could use to control sort order?
Hello Rich,
Related field has the items as ContentLinks, which on the other hand each have a property "Ordinal" used for the display order. What you can try is to change that value for your items as you need them to be displayed.
Hope this helps.
Regards,
Vassil Vassilev
Telerik