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 link from collections show template to collections index template

Roland Brödel February 19, 2021 by Roland Brödel

Hello,

can somebody give me an hint how to solve this topic?

in my show template I can create a "back to list-page (index-tempalte) link" with this fragments:

    {{ get_content from="accb493d-1bf9-4955-b438-de3583d0bfb7" }}

    <div class="text-center py-4">
        <span class="px-2">
            <a class="btn-up" href="{{ url }}">
                {{ title }}
            </a>
        </span>
    </div>

    {{ /get_content }}

or

{{ get_content from="/prix/laudationes" }}

<div class="text-center py-4">
    <span class="px-2">
        <a class="btn-up" href="{{ url }}">
            {{ title }}
        </a>
    </span>
</div>

{{ /get_content }}

In two languages this only works if the slug is the same like: /prix/laudationes /fr/prix/laudationes

If the slugs are different, I do not get the link.

Thank you for any help! Roland

Answered by Roland Brödel!
>>>>>>> Answered <<<<<<<
2 Replies
2 Followers