Copied to clipboard

Flag this post as spam?

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


  • Aung Zin Phyo 17 posts 87 karma points
    Jan 09, 2020 @ 03:23
    Aung Zin Phyo
    0

    Nested content is empty

    Hi I have a nested content called "CarDetails".If I retrieve data in custom surface controller,

    var nestedContent = content.GetValue<IEnumerable<IPublishedElement>>("CarDetails");
    

    is always null. How I get?and loop them by;

            foreach (var item in tempNestedContent)
        {
       string temp = @feature.GetProperty("boatTitle").Value();
       }
    
  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Jan 09, 2020 @ 05:22
    Dennis Adolfi
    0

    Hi. This should give you a collection of nested content item to iterate through:

    https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Nested-Content/#rendering-nested-content

    Best of luck to you!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies