Content Field Groups
Content field groups are a special type that can be added to each content type. When added to multiple content types, these groups share the same set of fields. It is essential to use unique names for the fields to avoid conflicts with existing ones.
For instance, if you wish to include "background_color" and "text_color" in various sections, you can create a content field group named "Section: Colors." Within this group, you can add specific fields such as a text field for background color and another for text color. Alternatively, you may opt for a select list, where predefined colors or tokens like "Primary color" and "Secondary color" can be fixed, depending on the theme design.
The advantage here is that any additional functionality or updates to the 'Section: Colors' group can be implemented in one place. This eliminates the need to add new fields to each section individually, which can become cumbersome with more than 10 section types. Furthermore, updating the description can be done centrally, automatically reflecting the changes across all associated fields.
💡 Utilize compact, reusable sets of fields to enhance true reusability.
Here are additional examples of usage:
Example: Post - Social Share
Content field group includes:
- social_image Image field.
- social_description Text area field.
This group can be applied to all types of posts. This empowers the editor to modify the social excerpt and image visible when sharing on platforms such as X or Facebook using Open Graph tags.
This metatags part would then be included in the head of page.