Copied to clipboard

Flag this post as spam?

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

  • apload-gmbh 22 posts 82 karma points
    Jan 13, 2023 @ 09:55

    Links with razor in partial view according language

    Dear community

    We have a multi-language customer website, and we like to set directly in the partial view of the footer an internal link to a subpage.

    Is there an easy solution to set a link that will work in every language, respectively goes to the language specific page, like

    DE: EN: FR:

    Or do we have to set that together with an extra helper?

    Thanks for any suggetions.


  • Dhanesh Kumar MJ 155 posts 507 karma points c-trib
    Jan 13, 2023 @ 15:19
    Dhanesh Kumar MJ


    You can get the specific content url based on culture, use a default culture code and you can use it like below.

    var defaultCulture= "culture code here";
    var defaultContent= _publishedContentQuery.Content().Url(culture:defaultCulture);

    _publishedContentQuery is IPublishedContentQuery

Please Sign in or register to post replies

Write your reply to: