- Issue created by @andyd328
The theme suggestions don't pick up the usual templates etc as the suggestions contain webform & entity id names
eg on a site I have products that use the pattern [entitytype]__[entitybundle]__[viewmode]
This is not in the template suggestions so it falls back to the field output as defined in the entity UI.
The suggestions offered by default are:
▪️ [entitytype]--[webform-name].html.twig
▪️ [entitytype]--[webform-name]--[entityid]--[viewmode].html.twig
▪️ [entitytype]--[webform-name]--[entityid].html.twig
▪️ [entitytype]--[webform-name]--[entitytype]--[viewmode].html.twig
▪️ [entitytype]--[webform-name]--[entitytype].html.twig
▪️ [entitytype]--[webform-name]--[entitytype]--[viewmode].html.twig
▪️ [entitytype].html.twig
Create a template using the name convention [entitytype]--[entitybundle]--[viewmode].html.twig
Add a relevant entity to a webform using the viewmode of the template above
View on site - the template suggestion will not be used.
Unsure... can this module intervene in a suggestion alter to offer all the usual theme hooks? eg [entitytype]__[entitybundle] and [entitytype]__[entitybundle]__[viewmode]
I was able to make a custom alter hook to add the suggestions I need, but I don't know if this is a good general solution.
Many thanks for the module, this has made my editors lives much easier!
Active
1.0
Code