Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update email template to use {{body}} rather than {{contentHtml}} #2140

Open
anchovy opened this issue Nov 12, 2024 · 0 comments
Open

Update email template to use {{body}} rather than {{contentHtml}} #2140

anchovy opened this issue Nov 12, 2024 · 0 comments
Milestone

Comments

@anchovy
Copy link

anchovy commented Nov 12, 2024

What are you trying to do?

I'd light Formie to automatically pick up the native Craft email template if set and allow this to be used as a template in the 'Edit Notification' > 'Templates' tab without having it be explicitly set as a email template in the formie settings.

What's your proposed solution?

As part of this - update the contentHtml variable to use body in line with the craft email template.
https://verbb.io/craft-plugins/formie/docs/template-guides/email-templates#available-template-variables vs https://craftcms.com/docs/5.x/system/mail.html#html-templat

I'm currently using the following to allow both craft and formie to use the same email template:

   {# body is craft default, contentHtml is formie default. #}
   {{body ?? contentHtml ?? ''}}

Additional context

No response

@anchovy anchovy changed the title Update email template to use body' rather than contentHtml` Update email template to use {{body}} rather than {{contentHtml}} Nov 12, 2024
@engram-design engram-design added this to the 2.2.0 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants