Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I'm trying to find my node by url: contentRequest.RoutingContext.UmbracoContext.ContentCache.GetByRoute("/login") or "/login/"
but it always returns null. This works only for top level node with url "/"
Thanks, Mike
Solution:
UmbracoContext.Current.ContentCache.GetByRoute("ParentID/route");
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetByRoute is not working for descendants
Hi,
I'm trying to find my node by url: contentRequest.RoutingContext.UmbracoContext.ContentCache.GetByRoute("/login") or "/login/"
but it always returns null. This works only for top level node with url "/"
Thanks, Mike
Solution:
UmbracoContext.Current.ContentCache.GetByRoute("ParentID/route");
is working on a reply...