The HQ have marked the property as Obsolete but it's still available for now. So no, currently you can upgrade and it will all continue to work.
However, they are encouraging the use of the extension method .Url() which allows for parameters to be passed in to indicate what type of URL to render (absolute or relative). So, although not required, it's advisable to switch out .Url with .Url() at some point. I do bits when working on different sections of a site.
I suspect that when the property is removed permanently (vNext I guess), that is when it will be flagged as breaking change.
Umbraco 8.8 Model.url - Obsolete??
In version 8.8 – is Model.url now obsolete?
In the code it says it is but I don’t see any documentation online to say it’s a breaking change.
Will we have to re-visit all our code if we upgrade?
Thanks
Jon
Hi Jon,
The HQ have marked the property as Obsolete but it's still available for now. So no, currently you can upgrade and it will all continue to work.
However, they are encouraging the use of the extension method
.Url()
which allows for parameters to be passed in to indicate what type of URL to render (absolute or relative). So, although not required, it's advisable to switch out.Url
with.Url()
at some point. I do bits when working on different sections of a site.I suspect that when the property is removed permanently (vNext I guess), that is when it will be flagged as breaking change.
Does that help?
Cheers
Nik
Hi Nik, Thanks for this. The biggest issue we find is using it in a class. For example,
If we change this to Url() - it throws this error:
Non-invocable member 'IPublishedContent.Url' cannot be used like a method.
Have I missed something obvious :) ?
Thanks
Hold that thought - we hadn't included Ubraco.web into the class - school boy error :)
Thanks for mentioning this part!
is working on a reply...