Hi there!
I am still in the process of learning all the good things that come with Grav.
Currently I'd like to replace my /email/templates/base.html.twig file with a custom designed email template.
I have tried adding a copy to my theme under /templates/email/base.html.twig and also tried /templates/partials/email/base.html.twig
I've had no luck with either.
This is likely under my nose somewhere, but I haven't had any luck with overriding the default base.html.twig template. I also don't see an option for defining a specific template in the form.md file.
Thank you for your help!
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Plugins
@rnjr It seems to be working OK in my installation:
- Copied folder '/user/plugins/email/templates/email' to folder '/user/themes/mytheme/templates/'
- Changed style in '/user/themes/mytheme/templates/email/base.html.twig' to:
CSS
h1, h2, h3 { ... color: red; } - Send email using
$ bin/plugin email test-email -t <my email address> - Received an email with a header in red...
Which theme are you using?
last edited 08/27/18 by pamtbaau
True, the message is six years old but, seen in a similar situation, I have realised that there is no point in overwriting the email template if in the form header you don't indicate that it processes the email in the appropriate mode, either text mode or html mode.
TWIG
form:
-
email:
body: '{% include ''forms/data.txt.twig'' %}'
Maybe @rnjr or someone else will find this detail useful.
Greetings!
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 42 | 1 week ago | ||
| 2 | 53 | 4 weeks ago | ||
| 3 | 1179 | 1 month ago | ||
| 1 | 47 | 1 month ago | ||
| 3 | 71 | 2 months ago |