Copied to clipboard

Flag this post as spam?

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


  • gani 1 post 71 karma points
    Mar 03, 2018 @ 08:38
    gani
    0

    multi node tree

    hi , i am having child list in my page , in that child list multi node picker is there i need to get the list in each item.

    i am getting the out put as

    System.Collections.Generic.List1[Umbraco.Core.Models.IPublishedContent] System.Collections.Generic.List1[Umbraco.Core.Models.IPublishedContent] System.Collections.Generic.List`1[Umbraco.Core.Models.IPublishedContent]

    i need the multi node picker list in each item ???

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

    @{ var selection = Model.Content.Children.Where(x => x.IsVisible()).ToArray(); }

    @if (selection.Length > 0) {

    foreach (var item in selection) {

          @item["galllsitdata"]
            <br/>
    
    
    
        }
    

    }

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Mar 04, 2018 @ 19:28
    Alex Skrypnyk
    0

    Hi Gani

    Use this code:

    foreach (var item in selection)
    {
        foreach (var childItem in item.GetPropertyValue<IEnumerable<IPublishedContent>>("galllsitdata"))
        {
            @childItem.Name<br />
        }
    }
    
  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Mar 07, 2018 @ 16:33
    Alex Skrypnyk
    0

    Hi Gani

    Did you solve the issue?

    Please, share with the community

    /Alex

Please Sign in or register to post replies

Write your reply to:

Draft