I have a custom entity with several fields. Now I would like to group the fields and give each group it's own twig template so that I would be able to compose a page (my custom entity) containing several sections (field groups).
How would you do that? Do I group the fields in the entity preprocess function and give each group it's own
'#theme', do I have to change my
hook_theme or should the grouping already happen in the controller? Or maybe create a computed field to store the other fields?
Thank you in advance!