Hot answers tagged

1

I found a solution: {% include "_private/partials/matrix" with {blocks: entry.bodyContent.typeId(null).all()} %} This fetches all Matrixobjects from any type. So it works now. But I don't undestand, why this is necessary. Maybe its because I used for my first project this Blogstarter. Maybe there are some relicts from craft2 inside. So I have the ...


1

Without seeing the code of your template _private/partials/matrix it's not easy to help you. Maybe you need to check the block type first. I usually do that with a switch and have a different partial for each block. So your template _private/partials/matrix could look something like this: {% for block in blocks %} {% switch block.type %} {% case "...


Only top voted, non community-wiki answers of a minimum length are eligible