Umbraco 8 : How to get Absolute URL from Content | Harikrishna Parmar

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.

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 parameterized 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 depending on what is the best, but you can also forcefully generate an Absolute URL using Mode UrlMode.Absolute.

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

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

test

Umbraco 14: Glimpse of the Latest Umbraco

18 September 2024

Umbraco 14 is a significant release that introduces several new features and changes aimed at improving the overall user experience, developer productivity, and extensibility of the CMS. Here are some of the key features and changes:

Scroll to top
px
px
px
px
px
px
px
Text
rem
rem
rem
Headings
rem
rem
rem
rem
rem
rem
rem
rem
px