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 used successfully this code snippet to switch languages in a multilanguage site with Umbraco 8.02.
@foreach (var (culture, infos) in Model.Cultures)
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.
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...
Write your reply to:
Image will be uploaded when post is submitted