Quantcast
Channel: Templating repeatable blocks in a matrix field - Craft CMS Stack Exchange
Browsing latest articles
Browse All 2 View Live

Answer by Jamie Jenkins for Templating repeatable blocks in a matrix field

It might be worth checking the types of the matrix block like:{% for block in entry.benefits.all() %} {% switch block.type %} {% case "intro" %} {# <=== ASSUMING BLOCK TYPE HANDLE #} {% for image in...

View Article



Templating repeatable blocks in a matrix field

I have a matrix field that has two different block types. The matrix field is on an entry that lists a number of benefits for a given product on a corporate website. The two different blocks are...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images