More in this section

Forums / Developing with Sitefinity / Control sort order for related media types

Control sort order for related media types

2 posts, 0 answered
  1. Rich
    Rich avatar
    24 posts
    22 Oct 2012
    08 Oct 2014
    Link to this post
    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?
  2. Vassil Vassilev
     Vassil Vassilev avatar
    308 posts
    21 Jan 2015
    13 Oct 2014
    Link to this post
    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.

    Vassil Vassilev
    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
2 posts, 0 answered