Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Oct 09, 2017 @ 05:44
    Biagio Paruolo
    0

    Solved - How to read data of Multinode Treepicker datatype from API?

    How to read data of Multinode Treepicker datatype from API?

  • Phil Atkinson 51 posts 244 karma points
    Oct 09, 2017 @ 07:23
    Phil Atkinson
    0

    you should be able to use this: https://github.com/umbraco/UmbracoRestApi

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Oct 09, 2017 @ 07:28
    Biagio Paruolo
    0

    Hi, I know that package, but at this stage is not possible to use it. I build a my web api with OAuth autentication with this good module ( https://github.com/mattbrailsford/umbraco-authu ). I've only to access Multinode Treepicker data.

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Oct 10, 2017 @ 05:05
    Biagio Paruolo
    100

    Solved ( Offerta is PublishedContentModel ):

    Offerta n = new Offerta(umbracoHelper.TypedContent(node.Id));
    
                //pushMessage.notification_target.type = "";
                pushMessage.notification_content.name = node.Name;
                // pushMessage.notification_content.title = node.GetValue("TitoloNews").ToString();
                pushMessage.notification_content.title = n.Titolo;
                pushMessage.notification_content.body = n.ContenutoMessaggioPush.ToString();
    
                List<string> province = new List<string>();
    
                var typedMultiNodeTreePicker = n.ProvincePush.ToList();
    
                foreach (var item in typedMultiNodeTreePicker)
                {
                    province.Add(item.Name.ToUpper().Trim());
    
                }
    
                var result = String.Join("|", province.ToArray());
                pushMessage.notification_content.custom_data.Add("province", result);
    
                string stringResult = await Invia(pushMessage);
    
Please Sign in or register to post replies

Write your reply to:

Draft