Questions tagged [matrix]

Matrix fields allow you to create multiple blocks of content within a single field.

Matrix fields have the following settings:

  • Configuration – This is where you configure which block types should be available to your Matrix field, and which sub-fields each of those block types should have.

  • Max Blocks – The maximum number of blocks that can be created within the field. (Default is no limit.)

See the Matrix Fields Documentation for more detail.

648 questions
11
votes
1 answer

Matrix field input error from within the control panel

I have a matrix field with around 26 block types with between 2-6 fields on each. It seems like I've hit a limit and cannot add any more fields to any of the block types. I can add a field if i delete one. I get the following error "Undefined index:…
Matthew Woods
  • 113
  • 1
  • 4
10
votes
2 answers

Matrix fields within matrix field

Is there a way to place matrix fields inside of matrix fields or also to setup a matrix field with existing fields? We are currently trying not to have duplicate content in terms of fields, but that doesnt seem possible?
nexflo
  • 539
  • 4
  • 13
7
votes
3 answers

Create matrix block with no fields

Is it possible to create a matrix block with no fields? I'm using matrix as a page builder and have several scenarios where certain matrix blocks simply act as true/false checks. As an example, my Horizontal Rule block simply adds an '< hr >' tag to…
Joe B
  • 146
  • 2
6
votes
4 answers

What's the most user friendly way to create a video block in a matrix field?

I want to make it super easy for my user to embed a video from YouTube (maybe eventually from other sources) without having to get the iframe code. They should only have to enter the URL for the video, and maybe check a couple of optional settings,…
Katie Fritz
  • 693
  • 4
  • 20
5
votes
1 answer

Return Matrix Field block number

Just wondering if there's a way to return the matrix block number during the loop? For example: {% for block in entry.myMatrixField %} {% if block.type == "quote" %}

{{ block.quote…

Mark Notton
  • 2,337
  • 1
  • 15
  • 30
5
votes
2 answers

Reusable Matrix block types

I'm building a site that makes heavy use of the Matrix field, which overall has been great. The one problem I'm running into is that I find myself duplicating a lot of Matrix blocks. To use the documentation as an example, you see block types such…
aw04
  • 185
  • 9
5
votes
2 answers

Is there a maximum number of fields in a single matrix?

I have a matrix with around 75 fields in it. They are spread over multiple "Block Types". When I create a new field and save the matrix, the new fields aren't being saved. Even worse, when I create a new block type with new fields and then drag it…
chrisyour
  • 83
  • 5
5
votes
1 answer

Saving big matrix fields problems

I'm implementing a site with just one very big matrix field called 'blocks', and all my frontend is designed with BEM CSS with a lot of components. But i'm facing problems with this big field. 1) If two block types have a field called 'cssClasses'…
5
votes
1 answer

Matrix: Hide preview

Is it possible to hide the preview shown by default when Matrix blocks are collapsed? You can collapse Matrix blocks by clicking the “Collapse” menu option, or by double-clicking on a block’s title bar. When a block is collapsed, its title bar…
Ian Young
  • 584
  • 3
  • 9
4
votes
3 answers

Return specific Matrix row?

I'm looking to be able to return the info from a field(s) from a Matrix row where I know which row I want (long story). I had a guess at various ways of doing this, but in the end the only way that worked was to run the loop with an if statement to…
pumkincreative
  • 761
  • 2
  • 7
  • 15
4
votes
2 answers

Neo Children Output

I have a Neo Field: I want to work with blocks up to 3 levels deep. My output code works fine: {% nav block in entry.myField.level(1) %} {% switch block.type.handle %} {% case 'title' %}

{{ block.title }}

Design Frog
  • 133
  • 1
  • 1
  • 4
4
votes
0 answers

How to get data of matrix fields?

below is my controller code for getting a data of prodcuts. $service = craft()->entries; $entry = $service->getEntryById(108); $title = $entry->getTitle(); $description = $entry->description; $overview = $entry->productOverview; $price =…
Renish Khunt
  • 299
  • 1
  • 6
3
votes
2 answers

Is it possible to take an excerpt from the first rich text area in a matrix?

I have blog articles set up on the site i'm working on to be built using a matrix, much the same way as in the features video about the matrix field. So it is entirely possible for an article to start with an image or a video. What i'd like to be…
Dan Owen
  • 496
  • 2
  • 12
3
votes
2 answers

Nested Matrix as field types

Are nested matrices panned for the coming future releases? I currently have a matrix where users can upload various assets. For each asset, they should be able to specify different details but this cannot be achieved with the current features as…
Maria Stellini
  • 415
  • 3
  • 10
3
votes
1 answer

How to access a previous matrix field value

I have a case where I need to access a previous matrix field's value (if it exists) in the next matrix loop result. {% for contentBlock in entry.contentBlocks %} {% if contentBlock.prev %} {% if contentBlock.getPrev().matrixField |…
Steve Adams
  • 1,671
  • 2
  • 15
  • 27
1
2 3 4 5 6