Copied to clipboard

Flag this post as spam?

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


  • crisweb 18 posts 88 karma points
    Jun 10, 2024 @ 14:15
    crisweb
    0

    Help for GridBlock

    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 1929 posts 6697 karma points MVP 2x c-trib
    Jun 12, 2024 @ 06:59
    Huw Reddick
    0

    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:

Draft