It would be nice if some similar modules can be listed so people can evaluate what it is best for their project
For example:
-
Twig Template Suggester - Adds template suggestions for Forms by form id.
There is also effort to merge Themable Fields into Twig Template Suggester:
-
formdazzle! - Adds opinionated template suggestions for Forms, Form Elements, Form Element Labels, and Inputs by form id and field name, with special handling for Webforms and Views Exposed Forms.
You can see a more detailed comparison here:
Comments
Comment #2
jwilson3Linking to #3278319: Feature comparison to themable_forms? from formdazzle! issue queue.
Comment #3
mlncn commentedComing over to check if Themable forms wanted to join forces with Twig Template Suggestions. We lean toward pointing to modules like themable forms that do more specific things but it's hard to keep track of multiple modules, such that in 2021 we pushed back on apparent duplicate functionality in #3117738: Theme suggestions for (form) fieldsets per form ID and then this year accepted a merge request that did the same #3217479: Forms do not have theme suggestions. For people not maintaining and contributing to either module, it is presumably even harder to keep track! Especially if the energy to maintain separate modules is lacking, maybe we should merge as was suggested in #3057385: Merge themable_forms into twigsuggest / #3057386: Merge into Twig Template Suggester.
So i think either we document each other and themable forms gets a Drupal 10 release and i'll revert this commit, or a maintainer or two comes over and we join forces?
Comment #4
mlncn commentedWow just realizing that what we just committed does not overlap with themable forms after all.
We already do document Themable forms on the Twig suggest module page:
Perhaps Themable forms could add this line to its project page:
.
Comment #5
jwilson3Updated issue summary with suggested documentation changes
Comment #6
ressaThanks @jwilson3 for your efforts with comparing the Twig template solutions available, it was really helpful for me to get an overview.
I have added a new "Get more specific Twig suggestions" section on the Working With Twig Templates documentation page.
Feel free to expand, edit it, or otherwise improve it. My aim is to guide people to that page, if they search for "drupal twig template suggestions".