Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# markfind 6/26/2007 8:09 AM
UrlHelper has many methods to obtain url from nodes: but what about a method to obtain Node from url? Something like:

public static Node GetNodeFromUrl(string url)
{
...
}

Is it possible?

Marco
# markfind 6/28/2007 4:13 AM
It is possibile.. (a)

public Node GetNodeFromUrl(string url)
{

return
_siteStructureDao.GetNodeByShortDescriptionAndSite(
HttpContext.Current.Request.QueryString["ShortDescription"],
this.Section.Node.Site);
}
# martijnb 6/28/2007 5:49 AM
UrlHelper is just a helper class doesn't perform database lookups. I'd create a separate class (or service) to perform these kinds of lookups.