Control sort order for related media types

Posted by Community Admin on 04-Aug-2018 18:00

Control sort order for related media types

All Replies

Posted by Community Admin on 08-Oct-2014 00:00

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?

Posted by Community Admin on 13-Oct-2014 00:00

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

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed