+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Access a Related Media Custom Field and iterate through the images.

Access a Related Media Custom Field and iterate through the images.

3 posts, 0 answered
  1. Todd
    Todd avatar
    0 posts
    Registered:
    29 Mar 2016
    12 Oct
    Link to this post
    My custom field is a related media field that allows multiple images.  When I attempt to access this field through  node.GetCustomFieldValue("FacebookOgImages"); - it returns a list.  How do I access this list in the view in order to set the open graph image urls needed for the layout?
  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    13 Oct in reply to Todd
    Link to this post

    Hi Todd,

    In which view do you want to access this field? Are u using Feather?

  3. Todd
    Todd avatar
    0 posts
    Registered:
    29 Mar 2016
    13 Oct in reply to Victor Leontyev
    Link to this post

    I just want to access it in the layout view.  I am using feather.

    When I access the custom field through GetCustomFieldValue - it returns a generic list.  Is there a way to iterate through that list?

3 posts, 0 answered