1

I have two locales (de, en) and a set of entries. Some have only the german locale enabled, some only the english one. Some have both enabled. Those entries have a status of "live".

What I want to achieve: When I’m on the english locale for example, all entries should be listed. If an entry is not available in the english locale, show the german one instead (or the disabled english one, if that would be possible).

I thought this would work:

{% set entries = craft.entries({
    section: 'mySection',
    localeEnabled: false
}) %}

{% for entry in entries %}
    {{ entry.title }}<br>
{% endfor %}

But this list only shows the entries for the current locale, but not for other locales. I can’t set status: null like mentioned in this thread, because I only want entries to show up that are set to "live".

Any hints? Or is it just not possible without setting status: null? I’m on Craft 2.6.2985.

Alternatively I could query for one locale first, then for the other one and merge the results. But that seems not very desirable for this rather simple need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.