Copied to clipboard

Flag this post as spam?

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

  • crisweb 16 posts 86 karma points
    3 days ago

    Good morning, we are in umbraco 12, in a GridBlock, with Documentype gridBlock and two element types provaBlock and oneColumnSectionBlock, I created a ViewComponet named GridBlock (same as Documentype) in the gridBlockComponent I have:
    var content = context?.GetRequiredUmbracoContext()?.PublishedRequest?.PublishedContent; which returns to me: look at the photo,

    enter image description here

    how do I access the provaBlock Element document? Thank you

  • Huw Reddick 1810 posts 6223 karma points MVP c-trib
    1 day ago
    Huw Reddick

    Hi crisweb,

    Try along these lines maybe

    var provablock = content.Content.Where(b => b.Content.ContentType.Alias == "provaBlock");
Please Sign in or register to post replies

Write your reply to: