Copied to clipboard

Flag this post as spam?

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


  • Urvish 252 posts 772 karma points
    Apr 21, 2015 @ 12:34
    Urvish
    0

    Equivalent method of uQuery.GetNodeByUrl in Umbraco Helper

    Hi,

    Can anyone have idea about the equivalent method of uQuery.GetNodeByUrl in Umbraco Helper class?

    Thanks in advance.

    Regards,

    Urvish Mandaliya

  • Urvish 252 posts 772 karma points
    Apr 21, 2015 @ 13:38
    Urvish
    0

    I found one solution in one post.

    UmbracoContext.Current.ContentCache.GetByRoute(string url)
    

    Is it best practice to get content node from ContentCache?

    Or any method available in Umbraco Helper class?

    Can any one help?

    Thanks in advance.

    Regards,

    Urvish Mandaliya

  • Urvish 252 posts 772 karma points
    Apr 23, 2015 @ 07:30
    Urvish
    100

    This method worked for me for fetching the content node.

    UmbracoContext.Current.ContentCache.GetByRoute(string url)
    

    It gives IPublishedContent as result.

    And uQuery.GetNodeByUrl gives NodeFactory.Node as result.

    Regards,

    Urvish Mandaliya

  • 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