Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin Meilander 34 posts 165 karma points c-trib
    Mar 05, 2021 @ 22:39
    Kevin Meilander
    0

    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.

  • kalspih 3 posts 73 karma points
    Mar 07, 2021 @ 20:17
    kalspih
    0

    What languages do you have deo with besides English?

  • Kevin Meilander 34 posts 165 karma points c-trib
    Mar 08, 2021 @ 14:13
    Kevin Meilander
    0

    I've got 6 other languages, and English set as my site's default language.

  • Kevin Meilander 34 posts 165 karma points c-trib
    Mar 08, 2021 @ 17:18
    Kevin Meilander
    0

    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?

  • 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.

Please Sign in or register to post replies