fixed readonline linnk in simplenews template

This commit is contained in:
Bachir Soussi Chiadmi 2022-05-06 00:41:47 +02:00
parent 2e525f668e
commit 62879244e1
2 changed files with 22 additions and 3 deletions

View File

@ -187,6 +187,23 @@ function materiotheme_preprocess_page(&$vars){
} }
/**
* Prepares variables for email template.
*
* Default template: email.html.twig.
*
* @param array $variables
* An associative array containing:
* - email: An associative array containing the Email object.
*/
function materiotheme_preprocess_email(&$variables) {
$email = $variables['email'];
$variables['body'] = $email->getBody();
$variables = array_merge($variables, $email->getVariables());
}
// function materiotheme_preprocess_node(&$vars){ // function materiotheme_preprocess_node(&$vars){
// $node = $vars['elements']['#node']; // $node = $vars['elements']['#node'];
// $options = ['absolute' => TRUE]; // $options = ['absolute' => TRUE];

View File

@ -1,16 +1,18 @@
{# dump() #}
{# devel_breakpoint() #}
{# dump(_context|keys) #}
{# dump(content_attributes) #}
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody> <tbody>
<tr> <tr>
<td style="padding: 37px 0; background-color: #eeeeee; text-align:center;" align="center" bgcolor="#eeeeee"> <td style="padding: 37px 0; background-color: #eeeeee; text-align:center;" align="center" bgcolor="#eeeeee">
<!-- #nl_container --> <!-- #nl_container -->
<p style="text-align:center; margin:5px 0;"><a href="#" style="font-size:9px; color:#444444;">Voir la version en ligne / View this email on the web</a> <p style="text-align:center; margin:5px 0;"><a href="[node:url]" style="font-size:9px; color:#444444;">Voir la version en ligne / View this email on the web</a>
<table bgcolor="#ffffff" style="margin: 0 auto; color: #444444; font-family: arial; font-size: 12px; background-color: #ffffff; float:none; position:relative;" width="600" border="0" cellspacing="0" cellpadding="0"> <table bgcolor="#ffffff" style="margin: 0 auto; color: #444444; font-family: arial; font-size: 12px; background-color: #ffffff; float:none; position:relative;" width="600" border="0" cellspacing="0" cellpadding="0">
<tbody> <tbody>
<tr> <tr>
<td style="text-align:left;"> <td style="text-align:left;">
{# <h2>{{ title }}</h2> #}
{{ body }} {{ body }}
<table style="margin: 0 0 0 10px; border-collapse: collapse; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;"> <table style="margin: 0 0 0 10px; border-collapse: collapse; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;">