New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

how to mount a collection multilingually/link to the whole collection?

cantalopes April 25, 2021 by cantalopes

i have a vey simple use case scenario:

i have a page called "news" in an multilingual environment, and want to be able to link this page in my menu. this would be really simple by doing {{link}} to the page url, but with multilingual/multisite i am lost.

  • how do i mount this collection to the whole page in all the languages, so i can share the {mount}/{url} url? the mount allows linking only to one page entry

  • if i were to not use the collection mounting, but manually define the multilingual routes in the collection configuration and just ty to link to the collection, how do i do that? because {{link}}/{{get_content}} accepts only one url/id. how do i link to the page multilingually? meaning it will link to one id one language and to another id in other?

the statamic clearly has this structure since the transpated collections entries are linked in the cp, but i have no idea how to use it in the templates

or do i have to do the ugly {{if lang==en}}{{get_content from="one id"}}{{else}}...?

>>>>>>> Unanswered <<<<<<<
1 Reply