Resource icon

Logo on emails (Really simple way)

mg33dev

Member
mg33dev submitted a new resource:

Logo on emails - Just a really easy way to add a logo to outgoing emails.

To place your logo in the emails please follow the details below;

  • Login to Admin
  • Go to Appearance > Templates
  • Choose your style
  • Click Email
  • Click MAIL_CONTAINER

Find the following lines: (should be on line 19)
Code:
<a href="{{ link('canonical:index') }}">{$xf.options.boardTitle}</a>

Replace with:

Code:
<a href="{{ link('canonical:index') }}">
<img src="HTTPS://FULL-URL-TO-YOUR-LOGO-FILE" width="354px"...

Read more about this resource...
 
If I do these changes in the template, will they be lost each time I upgrade (i.e. from XF2.1.0 to 2.1.1)?
 
If you don't like doing template edits, try this addon from @AndyB:

 
Logo on emails - Just a really easy way to add a logo to outgoing emails.
Is this will work on xf 2.2 ?
If using XF 2.2, it's probably better to replicate what they use within template ACTIVITY_SUMMARY_CONTAINER ...
Code:
                <xf:if is="property('emailPublicLogoUrl')">
                    <a href="{{ link('canonical:index') }}"><img src="{{ base_url(property('emailPublicLogoUrl'), true) }}" alt="{$xf.options.boardTitle}" /></a>
                    <xf:elseif is="property('publicLogoUrl')" />
                    <a href="{{ link('canonical:index') }}"><img src="{{ base_url(property('publicLogoUrl'), true) }}" alt="{$xf.options.boardTitle}" width="{{ property('publicLogoWidth') ?: '' }}" height="{{ property('publicLogoHeight') ?: '' }}" class="{{ property('publicLogoUrl')|to_lower|substr(-4) == '.svg' ? 'logo-svg' : '' }}" /></a>
                    <xf:else />
                    <a href="{{ link('canonical:index') }}">{$xf.options.boardTitle}</a>
                </xf:if>
 
Top Bottom