OK so I got entries articles with an asset field documents.
This asset field has an attribute called docType which is a dropdown with 5 values (A, B, C, D, E).

I d like to select all articles entries that have documents with docType=A criteria.

How can I dot that?
Should I make a relatedTo selection? I tried multiple things but nothing works.

1 Answer 1


You can do it like explained in this answer, only that you also add your dropdown field parameter to your craft.assets criteria model:

{% set assets = craft.assets.docType('A').limit(null) %}

and then:

{% set entries = craft.entries.section('articles').relatedTo({
    targetElement: assets,
    field: 'documents'
}) %}
  • Works perfectly! Thx so much :) Commented Sep 4, 2015 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.