I'm using craft 2 and have a list of category which are:

  • category A.
  • category B.

An entry which have different assigned categories in 2 locales.

An example entry belongs on category B in English locale and does not belong to category B in Spanish locale. However, it appears on list of category B in Spanish locale. This is my paginate code:

{% paginate craft.entries.relatedTo(category).order('title asc').limit(null) as entries %}
{% for entry in entries %}

What did I do wrong in here?

  • Finally, I found the answer after digging up craft database to see the relation between tables. If I want to specific show entry on current locale with assigned categories, I will have to add some parement on the fucntion. {% paginate craft.entries.relatedTo({targetElement: category, sourceLocale: locale}).order('title asc').limit(null) as entries %} – Nelson Nguyen Feb 19 at 7:45

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.