I noticed your new v11 and community websites include some html theme colors and that your community emails have included the site logo. Can you share the code snippet you added to your theme page so that we can add our site logo in our email messages as well like you have done?
Totara Learn Open Discussions
Adding site logo in emails
My post last month explains how to customise the email template, https://totara.community/mod/forum/discuss.php?d=22131
From there to get the image to work:
- Put the image into your themes pix directory.
e.g. totara/theme/yourthemename/pix/site-logo.png - Put the following snippet of code into the your email template where you want the image to appear.
{{#pix}}site-logo, theme_yourthemename{{/pix}}
Cheers
Sam
Hi Sam,
Couple things.
1. Can mustache template files be overridden using the custom scripts directory? Or do we have to create our own theme and make the changes to it there?
/theme/config.php
$THEME->doctype = 'html5';
$THEME->name = 'suave';
$THEME->parents = array('basis', 'roots', 'base');
$THEME->yuicssmodules = array();
$THEME->enable_dock = true;
$THEME->sheets = array('suave'); //I created a suave.css file and placed it in theme/suave/style .. doesn't seem to apply these changes though ?
$THEME->enable_dock = true;
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
$THEME->csspostprocess = 'theme_suave_process_css';
$THEME->parents_exclude_sheets = array(
'roots' => array('totara', 'totara-rtl'),
'base' => array('flexible-icons'),
)
I created a theme/pix directory and placed our logo.png file in there. I then have the below code in the email mustache file:
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="3" style="background-color: #97b9fc; line-height: 5px; font-size: 5px;"> </td>
</tr>
<tr>
<td width="10%"> </td>
<td valign="top">
<br /><br />
{{{body}}}
<br />
</td>
<td width="10%">{{#pix}}logo, theme_suave{{/pix}}</td>
</tr>
<tr>
<td colspan="3" style="background-color: #97b9fc; line-height: 5px; font-size: 5px;"> </td>
</tr>
<tr>
<td colspan="3" style="background-color: #3e60a8; line-height: 25px; font-size: 25px;"> </td>
</tr>
</table>
I am not seeing the logo in the emails, did i miss something?