Created
May 27, 2015 14:24
-
-
Save webflo/d88e2c83689028f88634 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_theme_suggestions_hook_alter(). | |
*/ | |
function foobar_theme_suggestions_swiftmailer_alter(array &$suggestions, array $variables) { | |
$module_defined = array_key_exists('module', $variables['message']); | |
$key_defined = array_key_exists('key', $variables['message']); | |
if($module_defined && $key_defined) { | |
$suggestions[] = 'swiftmailer__' . $variables['message']['module']; | |
$suggestions[] = 'swiftmailer__' . $variables['message']['module'] . '__' . $variables['message']['key']; | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "@my_theme/mail/swiftmailer.html.twig" %} | |
{% block body %} | |
<h2>Hallo {{ recipient_name }}!</h2> | |
<p>{{ sender_name }} ({{ sender_email }}) möchte Ihnen eine Seite im Intranet empfehlen:</p> | |
<p><a href="{{ page_url }}">{{ page_title }}</a></p> | |
{% if (message) %} | |
<p>Darüber hinaus wurde folgende Nachricht hinterlassen:</p> | |
<p style="font-weight: bold;">{{ message }}</p> | |
<br /> | |
{% endif %} | |
<p>Ihr Intranet-Team</p> | |
{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* The default template file for e-mails. | |
*/ | |
?> | |
<style type="text/css"> | |
table tr td { | |
font-family: Arial; | |
font-size: 12px; | |
} | |
</style> | |
<div> | |
<table width="800px" cellpadding="0" cellspacing="0"> | |
<tr> | |
<td> | |
<div style="padding: 0px 0px 0px 0px;"> | |
{{ body }} | |
</div> | |
</td> | |
</tr> | |
</table> | |
<h1>My Awesome E-Mail Footer</h1> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment