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
Hello,
I am using umbraco 7+.
Can i get umbraco node url from the nodeid in umbrao table using sql query?
With Regards,
Hi glob,
you should never query db for url's, unless you have a good reason to do so!
If you need url from node id, just use the Umbraco (UmbracoHelper) object on your views to fetch url
var publishedContent = Umbraco.TypedContent(id); var url = publishedContent.Url;
Cheers, Dirk
var publishedContent = Umbraco.TypedContent(id);
var url = publishedContent.UrlAbsolute();
Like Dirk is saying you can use the Umbraco build in helpers to get the Url of a node.
if you want the absolute url with domain you can use:
var nodeUrl = Umbraco.NiceUrlWithDomain(nodeId);
/Michaël
var domainURL=PublishedContentExtensions.UrlWithDomain(ipublishedContent);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to get Umbraco Node url based on nodeid in umbraco tables?
Hello,
I am using umbraco 7+.
Can i get umbraco node url from the nodeid in umbrao table using sql query?
With Regards,
Hi glob,
you should never query db for url's, unless you have a good reason to do so!
If you need url from node id, just use the Umbraco (UmbracoHelper) object on your views to fetch url
Cheers, Dirk
var publishedContent = Umbraco.TypedContent(id);
var url = publishedContent.UrlAbsolute();
Hi glob,
Like Dirk is saying you can use the Umbraco build in helpers to get the Url of a node.
if you want the absolute url with domain you can use:
/Michaël
var domainURL=PublishedContentExtensions.UrlWithDomain(ipublishedContent);
is working on a reply...