Harikrishna Parmar

Harikrishna Parmar

C# programmer | .NET developer | Umbraco Developer | React Developer | Full stack developer

Umbraco 8 : How to get Absolute URL from Content

There are big changes in Umbraco v8. In the website, we are using absolute URLs to set pages and links. In Umbraco 7 and Umbraco 8, there is different ways to get an absolute URL.

In Umbraco 7 :

we simply use UrlAbsolute() with IpublishedContent.

In Umbraco 8 :

There is little difference compared to v7. There is a parameterize method used to get the Absolute URL.

content.Url(string culture = null, UrlMode mode = UrlMode.Auto)
content.Url(string culture = null, UrlMode mode = UrlMode.Absolute)

using this type parameter, we can get a relative or absolute URL depends on what is the best, but you can also forcefully generate Absolute URL using Mode UrlMode.Absolute.

If this is help you or have any query please comment it here and I would like to help you. You can also contact me by email [email protected]

Please suggestions and your query, So I can improve it and try to resolve you query.