New answers tagged

1 vote

How to find number of assets inside a matrix block?

This is old but it looks like there was never an accepted answer. This seems to work for me. {% set count = block.carouselImages.count() %}
user avatar
0 votes

How do you filter matrix blocks by type?

In my Case i had to add .all() at the end then it worked with the Verison "Craft Solo 4.1.4.1"
user avatar
0 votes

Reordering Matrix blocks by date in the control panel when saving an entry

I managed to figure this out. Here is my working solution. Event::on(Entry::class, Element::EVENT_AFTER_PROPAGATE, function(ModelEvent $e) { // @var Entry $entry $entry = $e->sender; ...
user avatar

Top 50 recent answers are included