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

Reusable Matrix "Partials" ? #4769

Closed
shantamg opened this issue Aug 13, 2019 · 2 comments
Closed

Reusable Matrix "Partials" ? #4769

shantamg opened this issue Aug 13, 2019 · 2 comments
Labels
enhancement improvements to existing features site development 👩‍💻 features related to website/API development

Comments

@shantamg
Copy link

Pardon me if this idea is already documented somewhere, I did try searching.

I don't know about others, but I find that I'm often creating many matrix blocks with many of the exact same fields. I keep imagining a scenario where you could create "partials" to be reused across matrix fields. I know that might involve a pretty significant change to how those fields are organized, but perhaps there are even bigger ideas of how to make the whole situation more modular and flexible.

@brandonkelly brandonkelly transferred this issue from craftcms/craft Aug 17, 2019
@brandonkelly brandonkelly added site development 👩‍💻 features related to website/API development enhancement improvements to existing features labels Aug 17, 2019
@jsunsawyer
Copy link

jsunsawyer commented Aug 20, 2019

@shantamg We do this all the time.

You could set up a section for any number of re-usable content blocks. In your matrix field, you'd add a block type that contains an entry field so you can declare which re-usable content block to use. You'd just have to add a bit of template logic to load the correct content here.

Now your content is re-usable and a single update can affect all instances where your content is used.

For one of our clients, we just use entry fields to populate re-usable content blocks, ditching matrix completely. (This is mainly for translation reasons.)

@shantamg
Copy link
Author

shantamg commented Aug 21, 2019 via email

@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
enhancement improvements to existing features site development 👩‍💻 features related to website/API development
Projects
None yet
Development

No branches or pull requests

3 participants