diff --git a/web/themes/custom/materiotheme/materiotheme.theme b/web/themes/custom/materiotheme/materiotheme.theme index 117156da..427dd612 100644 --- a/web/themes/custom/materiotheme/materiotheme.theme +++ b/web/themes/custom/materiotheme/materiotheme.theme @@ -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){ // $node = $vars['elements']['#node']; // $options = ['absolute' => TRUE]; diff --git a/web/themes/custom/materiotheme/templates/email--simplenews-newsletter.html.twig b/web/themes/custom/materiotheme/templates/email--simplenews-newsletter.html.twig index 0a9b758e..b6a894ff 100644 --- a/web/themes/custom/materiotheme/templates/email--simplenews-newsletter.html.twig +++ b/web/themes/custom/materiotheme/templates/email--simplenews-newsletter.html.twig @@ -1,16 +1,18 @@ - +{# dump() #} +{# devel_breakpoint() #} +{# dump(_context|keys) #} +{# dump(content_attributes) #}
- Voir la version en ligne / View this email on the web + Voir la version en ligne / View this email on the web
|