Hot answers tagged

1

Do you have this problem in a multisite-installation? If so, it could be something with your propagation mode on the matrix field. Please give us some more details to your setup: which version of Craft CMS, which propagation mode, multisite or not.


1

I hope I am not completely missing the point, but I guess like that: Initial 5: {% for block in block.eventList.eventDate('>=' ~ (now|atom)).orderBy('eventDate asc').limit(5).all() %} {{ block.eventTitle }} {% endfor %} rest: {% for block in block.eventList.eventDate('>=' ~ (now|atom)).orderBy('eventDate asc').offset(5).all() %} {{ ...


1

Nevermind, the problem is solved. I just need to loop over the categories. {% extends "matrix/default" %} {% block blockContent %} <div class="row"> <div class="col flexcntr"> {% for merk in block.merkNaam %} {{ merk.title }} {% endfor %} #} </div> </div> {% endblock %}


1

You will need to use your Matrix field handle (which you didn't show in your question) and replace yourMatrixFieldHandle: {% for client in clients %} {{ client.title }} {# Get all blocks related to the client entry #} {% for block in client.yourMatrixFieldHandle.all() %} {% switch block.type %} {% case "clientImage" %} ...


1

I didn't test it yet but it should like this : {% set entries = craft.entries().section('schedules').all() %} {% for entry in entries %} {% for block in entry.stageSchedule : %} {% if block.type == 'yourblocktype' : %} {% for item in block.schedule %} {{ item.timeOn }} {% endfor %} {% endif %} {% endfor %} {% endfor %} ...


1

In reply. In a tweet from Brandon... Neo will get a direct upgrade path to matrix. https://twitter.com/brandonkelly/status/1114144432243265536?s=19 That being said. I used supertable more recently.


1

Craft 3 updated the code so this is the new way to get a matrix field that worked for me. The only difference is matrixField.blockTypes vs Craft 2 matrixField.getFieldType.getSettings.getBlockTypes {% set matrixField = craft.fields.getFieldByHandle('employmentMatrix') %} {% set blockTypes = matrixField.blockTypes %} {% for blockType in ...


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