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 108 posts 410 karma points
    May 26, 2020 @ 13:08
    André Lange
    0

    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 68 posts 383 karma points c-trib
    May 26, 2020 @ 18:44
    Malthe Petersen
    101

    Hey

    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 108 posts 410 karma points
    May 27, 2020 @ 07:42
    André Lange
    0

    Yep i found the same way.

    umbracoContext.Content.GetByRoute(url);
    
Please Sign in or register to post replies

Write your reply to:

Draft