Copied to clipboard

Flag this post as spam?

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


  • Jebastin 42 posts 91 karma points
    Sep 25, 2013 @ 13:21
    Jebastin
    0

    How to Convert "Multi-Node Tree Picker" XML to List<DynamicNode>?

    A "Multi-Node Tree Picker" returns XML data. How to convert it to List<DynamicNode>.

    Any Solution?

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Sep 25, 2013 @ 13:29
    Ali Sheikh Taheri
    0

    which version of umbraco are you using? v4 or v6?

    for v6 I would suggest to use csv and use this great package by jeavon Umbraco Core Property Editor Converters

  • Jebastin 42 posts 91 karma points
    Sep 25, 2013 @ 13:56
    Jebastin
    0

    I'm using v4 XML. I need the following conversion:

    umbraco.MacroEngines.DynamicXml TO System.Collections.Generic.List

    Can anyone provide solution for this?

  • Flavio Spezi 128 posts 314 karma points
    Sep 25, 2013 @ 18:52
    Flavio Spezi
    0

    I suggest you to go in Umbraco / Developer / Data Types / <your MultiNode-tree-picker> then set CSV in "Data as CSV or XML" option. Then you will do:

    var nodeIdList = Current.GetPropertyValue("<property name>").Split(',');
    var dynNodeList = new List<DynamicNode>(nodeIdList.Select(id => new umbraco.MacroEngines.DynamicNode(id)));
    
  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Sep 25, 2013 @ 19:19
    Jeavon Leopold
    0

    Hi, I guess if you are using DynamicNode you can't use the Mvc Property editor value converter package Ali mentioned.

    However, there are some well tested samples for MNTP to DynamicNode conversion in the documentation here

    Jeavon

Please Sign in or register to post replies

Write your reply to:

Draft