Questions tagged [matrix]
Matrix fields allow you to create multiple blocks of content within a single field.
664 questions
0 votes
1 answer
78 views
How do I programmatically add a Matrix block (converted from Super Table) in Craft CMS 5?
I'm upgrading a Craft CMS 4 project to Craft 5. In Craft 4, I used a Super Table field called resultComments, which contained one block type (Result Comments Block) with the following fields: user (...
0 votes
1 answer
59 views
Managing Front End Matrix and File upload fields, challenges
My user account collects standard stuff like name, job title, phone, etc. That works fine. The user account also has a matrix field for images, within that field there are image title, image desc, and ...
0 votes
1 answer
67 views
MatrixBlock::$deletedWithOwner must be ?bool
I'm currently upgrading a Craft CMS project from version 4 to 5. The update works perfectly on my local environment, but when building on the staging server, I run into this error after running: php8....
0 votes
1 answer
68 views
What would be the best approach to a 'live updating' news post in the CMS?
For example, Transfer Deadline Day, where the author will add new minor updates to a live post: https://www.bbc.co.uk/sport/football/live/cy0p77j5xwrt I have got it setup with a Matrix at the moment, ...
0 votes
0 answers
58 views
How can I populate a field with the content of another?
I have an image block in a components page builder matrix that has two fields: Image Caption While the Images Assets have a Default Caption field on them, so each image can have an initial caption ...
0 votes
1 answer
267 views
How do I query a Matrix field in v5, in a module (php)?
I have a module that mainly does normalization of data before sending it to the frontend through Element API. We're running Craft in headless mode. Previously, I have used this code to query a Matrix ...
0 votes
1 answer
82 views
How does the value of a Matrix field translate for different sites in Craft5?
I'm importing data from a complex excel file. I need to create or update Entries on the various sites that exist on my Craft installation. I have some Martix fields that are translatable by site but, ...
0 votes
1 answer
109 views
How to reuse entries but change data in one field | Craft 5
Let's say I have two Entry channels: Items and Collections. Collections have a relatedItems field in them. Items aren't unique to a Collection, and based on the Collection they're in, they could have ...
2 votes
1 answer
218 views
How Can We Use the Native Matrix Block Copy Feature in Craft CMS 5?
It seems that Craft CMS 5 introduced a new feature allowing users to copy, clone, and paste Matrix blocks natively, eliminating the need for third-party plugins like Smith. This was hinted at in ...
1 vote
0 answers
188 views
Craft 5.4 // Replace Neo with Matrix // any experiences?
I'm still on Craft 4.x and a Neo heavy user. First off, Neo is a brilliant plugin – many thanks to Spicy Web! But I still think about replacing Neo with the new features of Craft 5.x (such as the ...
1 vote
1 answer
101 views
FeedMe: glitches with importing assets into an assets field in a Matrix block (multisite instance)
I am an experienced user of FeedMe but I cannot get it to recognise an array of asset filenames in a Matrix block: The FeedMe config sees my JSON node for the assets, and allows me to save it into ...
1 vote
0 answers
92 views
5.x - Matrix Frontend Form Submissions
Has anyone found a way to create matrix field submissions with a frontend form? The docs for 5.x mention this section hasn't been updated and that the functionality has changed drastically. Craft 5.x -...
1 vote
1 answer
243 views
relatedTo craft 5 nested matrix entires
Im trying to query a list of matrix entries that have a related field but it doesn't work after updating to craft 5. Note that 'category' is not category field type, its a regular structured entry ...
1 vote
1 answer
56 views
Group matrix blocks by date
I'm trying to group events in a matrix field by day. Each date has a title and start and end time. I would like events for today, tomorrow and any dates beyond grouped separately. This is what I have ...
1 vote
1 answer
153 views
How to get all Matrix block fields in a templated table of all fields
I want to produce a templated table of all fields, including Matrix block fields which belong to their parent Matrix field. I've been scratching around the Craft 4 class reference and getting nowhere. ...