core
core copied to clipboard
Allow setcontent with the where keyword to accept a locale parameter for slugs.
{% setcontent mypage = "pages" where {locale: "mylocale", slug: "myslug"} %}
It is intended to work like this: it searches for a slug match in the language set by the locale parameter and returns the record if it exists in that locale.
From our Kampsite
When I submitted this, my intend was to avoid translation conflicts by for example translated slugs in pages and create an alternate access method to the record ID. I am open to different approaches if you already have something like this on the road somewhere.