• Icon: New Feature New Feature
    • Resolution: Outdated
    • Icon: Neutral Neutral
    • None
    • None
    • templates
    • None
    • Yes

      Since Magnolia/STK support multiple locales per site, it would be useful to provide a simple way for templates to display language switching links.

      By adding the attached code to the default STK model classes, template scripts could then simply render the links with the following snippet:

      <ul>
      [#assign localizedLinks=model.localizedLinks!]
      [#list localizedLinks?keys as lang]
        <li><a href="${localizedLinks[lang]}">${lang}</a></li>
      [/#list]
      </ul>
      

      Note that the provided code is pretty much a hack, mimicing the same hack which i18nAuthoringSupport does; it should be marked as temporary and updated once we can update the i18nContentSupport API and link API to provide this in a cleaner way. (further issues should thus link to this one)

        Acceptance criteria

              Unassigned Unassigned
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: