I write a patch for customing, in webform mails, only for mail with specific key.

With this patch you can create custom twig like webform-email-html--mail-key.html.twig.

<html>
  <head>
    <title>{{ subject }}</title>
    <style type="text/css">
       /* css only form mail "mail-key" */
    </style>
  </head>
  <body>
    {{ body|raw }}
  </body>
</html>

Is-it possible to commit-it?
if no, is there a better way to do it?

Comments

DILL created an issue. See original summary.

jrockowitz’s picture

StatusFileSize
new2.48 KB

I think we should follow the existing template suggestion pattern of using 'webform id;' -- 'plugin id' -- 'instance id'.

Below are the template suggesstion for the default contact form's email confirmation.

  • webform_email_html__contact
  • webform_email_html__contact__email
  • webform_email_html__contact__email__email_confirmation
DILL’s picture

thank you. it works perfectly

Status: Needs review » Needs work

The last submitted patch, 2: 3010559-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new3.01 KB

Fixing PHP memory limit issue during testing.

  • jrockowitz committed 7339606 on 8.x-5.x
    Issue #3010559 by jrockowitz, DILL: Custom twig mail head with mail key
    
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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