Does anybody know if it's possible to load matrixBlock and eager load the entries (=owner) the matrixBlocks belong to in Craft 3?

I tried:

{% set blocks = craft.matrixBlocks.type('eventDate').fieldId(4).with('owner') %}

but this does not work. Leaving out the .with('owner') works perfectly and then access its owner by block.owner.<fieldname>


Currently no, but I suppose since Craft 3 added the craft.matrixBlocks() template function, it would make sense to make this possible.

Just created a FR about this: https://github.com/craftcms/cms/issues/1820

Your Answer

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

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