Copied to clipboard

Flag this post as spam?

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


  • Kiran 17 posts 109 karma points
    Feb 25, 2021 @ 14:13
    Kiran
    1

    How to get nested content using nested content key

    Hi All, I have page in that page I created some nested content data. in that nested content I have model pop up functionality. By submitting button I need to get data in surface controller I'm passing key. but I'm unable get data using key how can i do this. Can any one please help me.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Feb 25, 2021 @ 23:22
    Alex Skrypnyk
    102

    Hi Kiran

    If you have Nested content you can get nested content item with this code:

    var elementByKey = Model.Value<IEnumerable<IPublishedElement>>("alias").FirstOrDefault(x => x.Key == key);
    

    Thanks, Alex

  • Kiran 17 posts 109 karma points
    Feb 26, 2021 @ 12:34
    Kiran
    0

    Thanks Alex.

Please Sign in or register to post replies

Write your reply to:

Draft