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 →

Localize Entities in Antlers by default? - Multi-Site

Jalil Wahdatehagh September 8, 2020 by Jalil Wahdatehagh


i have a question regarding the localization (Multi-Site context) of antlers templates.

What i have: - Two sites: en and de. - Two Entities - let's call them Parent and Child - In the childs' blueprint an Entity Fieldtype points to a Parent. The field is not marked as "localizable" so that editors don't have to re-link entries in every language (which imho wouldn't make sense). - There are translations for both a Parent entity and a Child entity; The latter points to the parent (by choosing the relationship in the

The problem: If i do the following in the template for a single parent it always shows me the default (en) version of the content, as that is what the parent ID links to.

<p>Parent: <a href="{{ parent:url }}">{{ parent:title }}</a></p>

But if i e.g. do the following, all the entries resolve to the ones in the current locale/site.

{{ collection:parents }}
    <li><a href="{{ url }}">{{ title }}</a></li>
{{ /collection:parents }}

I can't find a reasonable solution to this. Is this the supposed behaviour of antlers / how entities are resolved or am i missing something?


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