Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bijesh Tank 192 posts 420 karma points
    Oct 03, 2012 @ 23:21
    Bijesh Tank
    0

    Multi-node tree picker and CSV

    Hi,

    A little razor help here please. I have a multi-node tree picker that points to the media section and the resulting selection stored as csv. I'm trying to get write some razor to get the media id's out from the property and display out. Any tips?

    It is stored as this in the umbraco.config file:

    <images><![CDATA[1084,1087,1088,1089]]></images>

    Thanks,

    Bij

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Oct 03, 2012 @ 23:30
    Hendy Racher
    1

    Hi Bijesh,

    How about:

    @{
      string csv = uQuery.GetCurrentNode().GetProperty<string>("images");
      foreach (Media media in uQuery.GetMediaByCsv(csv))
      {
        // do something
      }
    }
    

     

  • Bijesh Tank 192 posts 420 karma points
    Oct 03, 2012 @ 23:55
    Bijesh Tank
    0

    Awesome stuff :)

    Thanks Hendy!

Please Sign in or register to post replies

Write your reply to:

Draft