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
Hi, I used successfully this code snippet to switch languages in a multilanguage site with Umbraco 8.02.
@foreach (var (culture, infos) in Model.Cultures) { <a href="@Model.GetUrl(culture)"> @Model.Value("title", culture) </a> }
After the upgrade to Umbraco 8.10 I get this error Any idea on how to solve it?
I might be wrong, but I think in the recent changes around the IPublishedContent the syntax is now the following
Model.Url(culture);
Give it a try
You can also pass in a second parameter in order to get Relative/Absolute URL.
Model.Url(culture, UrlMode.Absolute); // Returns Absolute URL Model.Url(culture, UrlMode.Relative); // Returns Relative URL
URLMode is an optional parameter and is set to UrlMode.Auto by default.
Hope that helps
Thank you, it works perfectly!
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
Language switcher error on 8.10
Hi, I used successfully this code snippet to switch languages in a multilanguage site with Umbraco 8.02.
After the upgrade to Umbraco 8.10 I get this error
Any idea on how to solve it?
I might be wrong, but I think in the recent changes around the IPublishedContent the syntax is now the following
Give it a try
You can also pass in a second parameter in order to get Relative/Absolute URL.
URLMode is an optional parameter and is set to UrlMode.Auto by default.
Hope that helps
Thank you, it works perfectly!
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.