Hello dear all,
Could you help me to figure out the following/any best practices you use, as well as, risks/limitations?
Modular block/Global types
Use case: We are about to have 7 page content types which will include modular block. Each page has different modular block (with different set of elements/blocks in it). However, elements within the blocks will be repeating themselves (in terms of structure, not content).
Question: What is the best practice to organize modular blocks?
a) Should there be content types for each of the element that is in modular block if the content is not consider as repetitive for other pages? Could here be a good place to use global data?
b) Should there be created a structure for each element of modular block + one block that is reference which will allow to reference any of allow content types for this block in case of reusable content
1.1. Should we consider any naming convention for the modular blocks?
Best answer by Victor MonschView original
A good practice is looking at what is going to be reused. Is it content (e.g. a library of banners that can be referenced from multiple other content types), or is it structure?
You already did that and mentioned it would be the structure, that’s great.
To reuse the structure, I would use global fields: they are essentially substructures that you can use as modular blocks and which allows you to manage your whole content model in a better and more reusable way.
Learn more about those here: https://www.contentstack.com/docs/developers/create-content-types/global/
If the goal was reusing content, then indeed I would have used a separate content type which can then be referenced from modular blocks.
As per the naming convention, there is no preference on our part: just name it something that your content editors will understand and that makes sense in your context.
Hope that helps.