Directus
#### :rotating_light: MIGRATED FROM REQUESTS.GETDIRECTUS.COM :rotating_light:

# Matrix/Replicator Field Type

### :+1: = 18


-----
### @bcartier – (2 years ago)

A field type similar to Statamic's Replicator (https://docs.statamic.com/fieldtypes/replicator) or the Craft CMS Matrix Field (https://craftcms.com/docs/matrix-fields) that would allow you to build an entry from various blocks (other fields). Add a WYSIWYG block, then a relationship field pulling from other tables, then another WYSIWYG, then and image block etc... This allows you to keep the WYSIWYG field simpler (without having to embed everything inside it), while having editorial freedom well-structured content.




-----
### @benhaynes – :+1: (1 year ago)

Same as current M2M UI, except: 1. Junction table also stores the related table 2. UI is editable inline instead of each item opening in an overlay

Below is one direction, but you could just as easily store data in the junction table itself instead of multiple related tables.

Example of schema:

THIS TABLE - matrix_column (ALIAS) Like a M2M but also stores the related table...

JUNCTION TABLE - id - sort - matrixid - relatedtable (NEW!) - related_id

RELATED TABLE VARCHAR - id - title (VARCHAR)

RELATED TABLE TEXT - id - text (TEXT)

RELATED TABLE INT - id - image (INT)

Example of what junction table stores:

{ id: 1, sort: 1, parentid: 1, related_table: 'varchar', related_id: 1, data: { title: "My Matrix Title" } }, { id: 2, sort: 2, parent_id: 1, related_table: 'text', relatedid: 1, data: { text: "Lorem ipsum dolor et..." } }, { id: 3, sort: 3, parentid: 1, relatedtable: 'image', related_id: 1, data: { image: 1, data: { url: "my-file.jpg" } } }



-----
### @luminarious – (1 year ago)

This and Postgres support were the two reasons we didn't go with Directus for a medium-sized content site (couple of hundred pages in 3 languages) at my current organization, despite the really good overall developer experience




-----
### @Elvanos – :+1: (3 months ago)

Lack of this single feature is the sole reason I am incapable of replacing WordPress with your great CMS... please add it, we really need it!