Webform and mimemail template

Created on 16 March 2023, over 1 year ago
Updated 21 March 2023, over 1 year ago

Properly naming template file for webform email?

Steps to reproduce

Nothing special,

Drupal 9
webform module
mail system module
mimemail module

All configured and working with the template already customized by me:
- mimemail-message.html.twig WORKS
- mimemail-message--webform.html.twig WORKS

The problem is with a custom template that I want to use for the specific webform with id = contact

The readme says:
mimemail-message--[module]--[key].html.twig

So I've tried:
- mimemail-message--webform--contact.html.twig

and also

- mimemail-message--webform-contact.html.twig
- mimemail-message--contact.html.twig

Nothing works.

Am I missing something?

Let's take a step back. I read that:

mimemail-message--[module]--[key].html.twig

I assumed that key = id of webform.

It's correct?

If not... where do I find the key of my webform?

💬 Support request
Status

Fixed

Component

Theming

Created by

🇮🇹Italy sistro

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sistro
  • Status changed to Fixed over 1 year ago
  • 🇺🇸United States tr Cascadia

    In this case the keys are defined by Webform. I don't happen to know how Webform names its keys. You can ask in the Webform queue to see if anyone knows, and/or you can turn on theme debugging on your site to see what value the "key" variable holds in your twig template. Or just print the "key" variable in your template as a test.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024