- Issue created by @donquixote
For me, one of the most common use cases for field_group is to group content fields in the display area.
A natural html tag would be <section>
and <h2>
or <h3>
And yet, field_group module does not offer this possibility.
Also, I find no other modules that do it.
It is possible to achieve this with "html element", or with template overrides.
But this leads to a lot of custom code or config per field group, instead of having a simple standardized way to achieve it.
Create a field group formatter for "section + heading".
To choose the heading level, either provide settings, or make it a plugin deriver.
On theme level, we could provide an element type, a theme hook, and/or an sdc.
We could provide default styling for margins, or not.
We should consider:
I would create a new contrib module for this, but I first want to bring it up to field_group queue, to see if there is an interest.
Easy to apply the formatter on multiple field groups, without going into settings, assuming that this could become the most commonly used field group formatter.
Easy to override in themes.
Acceptable out of the box experience without theme override.
Add this to field_group module, or create a new module instead? Should some of this (element type) even go into core?
Theme hook, render element type, or sdc?
Setting or plugin deriver for the heading level?
Active
3.0
Miscellaneous