I have a Matrix field and I want to be able to filter by it.

For example I want to get all entries that has matrixField.field1Type.value = {some value}.

How can I do that?

1 Answer 1


You can query Matrix blocks like you are used to with all other elements

{% set blocks = element.matrixFieldHandle.type('typeHandle').field('some value').all() %}

Keep in mind your field should be a valid field handle within your block type


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.