I'm trying to override an email template of the webform module. The project is headless so we don't have a custom theme, and we'd like to stick with the Adminimal contrib theme. However, we do have a custom module named app
in web/modules/app
.
Here are the default template suggestions shown in the email source:
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'webform_email_html' -->
<!-- FILE NAME SUGGESTIONS:
* webform-email-html--contact--email--email-notification.html.twig
* webform-email-html--contact--email.html.twig
* webform-email-html--contact.html.twig
x webform-email-html.html.twig
-->
<!-- BEGIN OUTPUT from 'modules/contrib/webform/templates/webform-email-html.html.twig' -->
If I just create a web/modules/app/templates/webform-email-html.html.twig
file (or any of the other suggestions), the template override doesn't work: the template of the webform module is used.