Access the friendly URL of a content Item
Abstract
How to access the friendly URL of a content Item using the Sitecore.Links.LinkManager.GetItemUrl()
method.
You can use the Sitecore.Links.LinkManager.GetItemUrl()
method to access the friendly URL of a content item. For example, to access the friendly URL of the /Sitecore/Content/Home item in the Master database:
Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master"); Sitecore.Data.Items.Item home = master.GetItem("/sitecore/content/home"); string url = Sitecore.Links.LinkManager.GetItemUrl(home);