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
I want to retreive the complete slug instead of the UrlSegment of an IPublishedContent item. How can I do this in Umbraco 9?
Thanks.
Hi Martijn,
Instead of using the .UrlSegment property on the IPublishedContent item, you can use the Url() extension method included in Umbraco by importing 'Umbraco.Extensions.FriendlyPublishedContentExtensions.Url'!
Hope this helped!
Nice one Corné, thanks.
Yes, that's it, thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to get the complete slug of an IPublishedContent item?
I want to retreive the complete slug instead of the UrlSegment of an IPublishedContent item. How can I do this in Umbraco 9?
Thanks.
Hi Martijn,
Instead of using the .UrlSegment property on the IPublishedContent item, you can use the Url() extension method included in Umbraco by importing 'Umbraco.Extensions.FriendlyPublishedContentExtensions.Url'!
Hope this helped!
Nice one Corné, thanks.
Yes, that's it, thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.