Support Forum
Hi! I've recently started to use Metabox for some of my customers, but previously I was using Strapi Headless CMS.
Does Metabox have any kind of dynamic repeater with multiple options for data? For example: A portfolio showcase could have multiple different sections, such as pictures with text on the left, videos, testimonials, etc.
I want to be able to have a repeater on the portfolio custom post type that allows me to choose and add the sections mentioned above, so that I can build a dynamic page using that repeater.
Maybe project 1 has a hero section, a picture with text and a testimonial; but project 2 only has a hero section with a video section, so the repeater should ask what type of section I want for each entry and show the fields accordingly.
In Strapi this is known as "Dynamic Zones", in case someone knows what I'm talking about.
Thank you for your responses
Hi,
Thanks for reaching out.
The cloneable is a standard feature of Meta Box, it is applied to all field types. Please read more on the documentation https://docs.metabox.io/cloning-fields/
In your case, I think you can use a cloneable group with subfields to create sections for the CPT. But please notice that Meta Box helps you to create the custom fields and add values for the CPT in the backend and output the field values in the frontend with the raw data. If you want to display them in a pretty layout, you need to create your own custom code (HTML, CSS). Or using a page builder plugin that is compatible with Meta Box, such as Elementor, Beaver, Oxygen.
https://docs.metabox.io/extensions/meta-box-group/
Hi,
Thank you for your suggestion. I think I could make this work, but it's not exactly what I'm looking to do. I don't know exactly how to do it on PHP or on WordPress for that matter, but I have found that "Dynamic Zones" of Strapi CMS to be really helpful.
You can literally click on "Add zone" and it lets you choose which component you want to add from the ones you pre-configured (testimonial, videos, photos, details, etc.) and then it shows you only the fields according to your selecction. In that way, I can build a complete dynamic page and on the front-end just create the template for each section type.
It would be really nice to have something like that on Meta box, but I don't know if it's possible given the WordPress's database.
Either way, thank you very much!