Hot answers tagged

2

Assuming you can have multiple person blocks per entry (group), you could: Fetch your entries and eager-load the blocks and their entry to save some overheads {% set group = craft .entries() .id([100,200,300]) .with(['people.person:entry']) .all() %} Then build an array with each person.entry {# The array to store your person.entry #} {% set ...


2

This isn't ideal and reviewing your markup might be a better alternative but you could use the loop variable provided by Twig's for (docs). For you example, something like this should work {# Inject this on the first iteration only #} {% if loop.first %} <div class="relative bg-gray-50 pt-16 pb-20 px-4 sm:px-6 lg:pt-24 lg:pb-28 lg:px-8"> &...


1

As you can see from the screenshot below and as Oli already mentioned, you can simply drag the content blocks on a page and hit the save button. That said, this is possible with contentblocks that are in a matrixfield. If you have regular fields for your page, you will need to arrange them in the section setup. Only matrix block elements can be arranged ...


1

By default, Matrix blocks will display in the order you have entered them in your entry form. If you need to change the display order, you can drag/drop your blocks straight from your entry form using the small handle on the right of the blocks and the order will be reflected on your page.


1

On first blush they are very similar. I think the Craft Plugin Store description of Neo sums it up nicely: Neo is a field type that builds upon the concept of the Matrix field type with a number of very useful features. Neo solves one of the biggest issues people have with Matrix and adds Oreo features: no blocks within blocks. Sometimes you need this ...


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