Copied to clipboard

Flag this post as spam?

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


  • Amir Khan 1287 posts 2744 karma points
    Jul 12, 2023 @ 15:55
    Amir Khan
    0

    Access UmbracoContext in v11

    Hi, I'm trying to port something over from a v8 site where I could access the properties of a page from within a blocklist editor using the following, but I'm not sure how to access UmbracoContext in v11.

    var content = Current.UmbracoContext.PublishedRequest.PublishedContent;
    
  • Johan Reitsma 68 posts 234 karma points MVP
    Jul 13, 2023 @ 09:29
    Johan Reitsma
    0

    In Umbraco views you can use Umbraco.AssignedContentItem to access the current Umbraco published content item. Is this what you need?

Please Sign in or register to post replies

Write your reply to:

Draft