Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarchical Matrix fields #827

Closed
angrybrad opened this issue Jan 31, 2017 · 8 comments
Closed

Hierarchical Matrix fields #827

angrybrad opened this issue Jan 31, 2017 · 8 comments
Labels
content modeling 📓 features related to content modeling enhancement improvements to existing features matrix 🕶️ features related to Matrix fields

Comments

@angrybrad
Copy link
Member

angrybrad commented Jan 31, 2017

Created by: Brandon Kelly ([email protected]) on 2015/03/06 03:54:45 +0000
Votes at time of UserVoice import: 58


As an alternative to Matrix within Matrix (#812), it might be nice if Matrix fields were hierarchical, like Structure sections.

The UI for that would be a bit simpler, since a nested blocks would be nested under the entire parent block, rather than crammed into one of the parent block’s fields.

We could even set up some block type rules that restrict which levels the block types are allowed to be used on (or what their parent block types must be, etc.), similar to #853.

@angrybrad
Copy link
Member Author

angrybrad commented Jan 31, 2017

Posted by idol chan ([email protected]) on 2016/04/25 03:40:41 +0000


push. i think structure is sufficient.
Matrix in a matrix seems too complicated and actually a little bit overdo

lets use the nav here for easy demo

{% nav matrixBlock in entry.matrixFieldHandle %}
    <div>
    {% switch matrixBlock.type %}
    ...
    {% endswitch %}
    {% if children %}
        {% children %}
    {% endchildren %}
    </div>
{% endnav %}

@angrybrad
Copy link
Member Author

angrybrad commented Jan 31, 2017

Posted by Luke Holder ([email protected]) on 2015/03/13 01:14:30 +0000


@brandon and @mark i have submitted the entry in an entry idea here: #834

@angrybrad
Copy link
Member Author

Posted by Christian ([email protected]) on 2015/03/09 00:49:13 +0000


I think Mark's idea to create new entries from an entries field would be a good solution for anything this FR isn't enough for.

So 2x "+1" for these suggestions (sorry, I ran out of real votes)!!

@angrybrad
Copy link
Member Author

Posted by Michael ([email protected]) on 2015/03/11 15:06:07 +0000


This is a great idea. I think I even prefer it to the Pandora's box of actually nesting the Matrix fields.

@angrybrad
Copy link
Member Author

Posted by Brandon Kelly ([email protected]) on 2015/03/06 03:54:45 +0000


@mark - that's more conceptually similar to the traditional Matrix-within-Matrix request; it's actually a step further, since not only can you have multiple Matrix fields within the related entries, but you can also have multiple Entries fields within a single Matrix block.

Regardless, you may want to post your FR as its own idea ;)

@angrybrad
Copy link
Member Author

Posted by Mark ([email protected]) on 2015/03/11 12:02:21 +0000


I like this idea, but isn't that somewhat similar, conceptually, to an "entries" field with a related entry containing a matrix?

Personally, I'd rather see the ability to create new entries from an Entries field. This way you could have nested matrix blocks but still retain the existing UI.

@angrybrad
Copy link
Member Author

Posted by Brandon Kelly ([email protected]) on 2015/03/06 03:54:45 +0000


Technically it would be more limiting, since each Matrix block would only get a single set of sub-blocks, whereas if it was possible to have an entire Matrix field within another, then each block could have multiple sets of sub-blocks (via multiple sub-Matrix fields). I’m just not sure if there are many valid use cases for that, or if this hierarchical Matrix idea would suffice 90% of the time Matrix-within-Matrix is desired.

@angrybrad
Copy link
Member Author

Posted by John Baxter ([email protected]) on 2015/03/11 09:07:25 +0000


As long as ultimately the functionality you can achieve is the same, then great!!

@brandonkelly brandonkelly added content modeling 📓 features related to content modeling matrix 🕶️ features related to Matrix fields labels Feb 25, 2018
@brandonkelly brandonkelly added enhancement improvements to existing features and removed feature labels Mar 5, 2019
@craftcms craftcms locked and limited conversation to collaborators Jun 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
content modeling 📓 features related to content modeling enhancement improvements to existing features matrix 🕶️ features related to Matrix fields
Projects
None yet
Development

No branches or pull requests

2 participants