Copied to clipboard

Flag this post as spam?

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

  • André Lange 102 posts 404 karma points
    May 26, 2020 @ 13:08
    André Lange

    I am trying to get an IPublishedContent node by a url.

    There was this in v7, but it's now obsolete.

    UmbracoContext.Current.ContentCache.GetByRoute(string url)

    Is there a v8 equivalent ?

    the url i have is /some-page/sub-page/

  • Malthe Petersen 35 posts 211 karma points c-trib
    May 26, 2020 @ 18:44
    Malthe Petersen


    You should be able to do the exact same thing in Umbraco 8: Current.UmbracoContext.Content.GetByRoute(url)

    Hope it helps.

    Regards Malthe

  • André Lange 102 posts 404 karma points
    May 27, 2020 @ 07:42
    André Lange

    Yep i found the same way.

Please Sign in or register to post replies

Write your reply to: