Copied to clipboard

Flag this post as spam?

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


  • Richard Downes 1 post 71 karma points
    Jul 29, 2019 @ 15:13
    Richard Downes
    0

    Render Nested content that's a paramter on a macro

    Hello,

    Would anyone be able to point me in the right direction for rendering out Nested Content that has been selected as a parameter in a macro partial?

    I can render out the non-nc content on a macro dropped onto a grid, but i'm unsure how to get the nested content?

    Thanks in advance.

  • Mathias valling 16 posts 126 karma points
    Jul 30, 2019 @ 09:33
    Mathias valling
    0

    Hi Richard,

    have you tried something like. (version 8.1)

    IPublishedContent nc = Umbraco.Content(Model.MacroParameters["nc-test"]);
    
    @foreach (var item in nc .Value("nc-content"))
      {
         <h1>item.name</h1>
      }
    
  • 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