Fallback for the URL on MultiUrlPicker if language is not published
I'm trying to setup my multi-lingual site so if my page doesn't have a published version for the language I'm in, it shows the English content.
Since the language version has not been created yet, it doesn't have a URL so my plan was to link the user to the English URL rather than the translated one. If I select a page using a MultiUrlPicker and the language I'm in is published, it will work fine and return the correct link. However if the language for that page is not published, it will return "#"
Is there a way to set the fallback logic on a MultiUrlPicker field so if the users language isn't published for the selected page, it returns the default language's URL rather than defaulting to "#"?
I can't see an easy way to do it, but curious if any one else has came across this issue.
It looks like this is also true for a IPublishedContent Url() property.
It looks like I can specify the culture for the requested URL, but I can't set a fallback like I can for a Value().
Do I just need to handle this myself and check if the language is published before getting the URL and if not get the English URL, or is there a way to have Umbraco do this step?
Fallback for the URL on MultiUrlPicker if language is not published
I'm trying to setup my multi-lingual site so if my page doesn't have a published version for the language I'm in, it shows the English content.
Since the language version has not been created yet, it doesn't have a URL so my plan was to link the user to the English URL rather than the translated one. If I select a page using a MultiUrlPicker and the language I'm in is published, it will work fine and return the correct link. However if the language for that page is not published, it will return "#"
Is there a way to set the fallback logic on a MultiUrlPicker field so if the users language isn't published for the selected page, it returns the default language's URL rather than defaulting to "#"?
I can't see an easy way to do it, but curious if any one else has came across this issue.
What languages do you have deo with besides English?
I've got 6 other languages, and English set as my site's default language.
It looks like this is also true for a IPublishedContent Url() property.
It looks like I can specify the culture for the requested URL, but I can't set a fallback like I can for a Value().
Do I just need to handle this myself and check if the language is published before getting the URL and if not get the English URL, or is there a way to have Umbraco do this step?
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.