Copied to clipboard

Flag this post as spam?

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


  • Umbracoraco 24 posts 154 karma points
    Jan 31, 2023 @ 07:16
    Umbracoraco
    0

    How to get content by route in Umbraco 10?

    How should I change this to achieve the same result in Umbraco 10? 
    
     public IPublishedContent GetContentByRoute(string route)
        {
            return Umbraco.Web.Composing.Current.UmbracoContext.Content.GetByRoute(route);
        }
    
  • Umbracoraco 24 posts 154 karma points
    Feb 01, 2023 @ 05:48
    Umbracoraco
    100

    Solved by injecting umbraco context!

  • 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