From 1c8e810789b79ecaf9c3c0818169a2a3a56f8dfa Mon Sep 17 00:00:00 2001 From: bach Date: Sat, 21 Aug 2021 21:35:29 +0200 Subject: [PATCH] rewrited the simplenews template --- .../simplenews-newsletter-body.html.twig | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 web/themes/custom/materiotheme/templates/simplenews-newsletter-body.html.twig diff --git a/web/themes/custom/materiotheme/templates/simplenews-newsletter-body.html.twig b/web/themes/custom/materiotheme/templates/simplenews-newsletter-body.html.twig new file mode 100644 index 00000000..3c5ef317 --- /dev/null +++ b/web/themes/custom/materiotheme/templates/simplenews-newsletter-body.html.twig @@ -0,0 +1,147 @@ +{# +/** + * @file + * Default theme implementation to format the simplenews newsletter body. + * + * Copy this file in your theme directory to create a custom themed body. + * Rename it to override it. Available templates: + * simplenews-newsletter-body--[newsletter_id].html.twig + * simplenews-newsletter-body--[view mode].html.twig + * simplenews-newsletter-body--[newsletter_id]--[view mode].html.twig + * See README.txt for more details. + * + * Available variables: + * - build: Render array. Use {{ build }} to print it. + * - node: object(Drupal\node\Entity\Node) + * The node entity with limited access to object properties and methods. + * * Methods: Only "getter" methods (method names starting with "get", "has", or "is") + * and a few common methods such as "id" and "label" are available. + * {{ node.getTitle }} : the Node title ( == {{ title }} ) + * Calling other methods (such as node.delete) will result in an exception. + * * Properties: field values can be accessed as follows: + * {{ node.body.value | raw }} : text of body field + * - newsletter: object(Drupal\simplenews\Entity\Newsletter) + * {{ newsletter.from_name }}: string + * {{ newsletter.subject }}: string + * - title: Node title + * - view_mode: The active display view mode of the node + * - key: email key [node|test] + * - format: newsletter format [plain|html] + * - simplenews_subscriber: object(Drupal\simplenews\Entity\Subscriber) + * The subscriber for which the newsletter is built. + * {{ simplenews_subscriber.getMail }}: string: subscriber's email address + * Note that depending on the used caching strategy, the generated body might + * be used for multiple subscribers. If you created personalized newsletters + * and can't use tokens for that, make sure to disable caching or write a + * custom caching strategy implemention. + * + * @see template_preprocess_simplenews_newsletter_body() + */ +#} + + + + + + +
+ +

Voir la version en ligne / View this email on the web + + + + + + +
+ +

{{ title }}

+ {{ build }} + + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + Facebook + + + + Twitter + + + + Linkedin + + + + Pinterest + +
+
+
+
+
+
+ + + + + + +
+   +
+ +{% if not opt_out_hidden %} + {% if format == 'html' %} +

+ {% else %} + -- {{ unsubscribe_text }} : [simplenews-subscriber:unsubscribe-url] + {% endif %} +{% endif %} + +{% if key == 'test' %} + - - - {{ test_message }} - - - +{% endif %} + + +
\ No newline at end of file