simplenews symfony template

This commit is contained in:
Bachir Soussi Chiadmi 2022-05-05 23:50:11 +02:00
parent 567b628e12
commit 2e525f668e
1 changed files with 2 additions and 42 deletions

View File

@ -1,57 +1,17 @@
{#
/**
* @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()
*/
#}
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="padding: 37px 0; background-color: #eeeeee; text-align:center;" align="center" bgcolor="#eeeeee">
<!-- #nl_container -->
<p style="text-align:center; margin:5px 0;"><a href="{{ path('entity.node.canonical', {'node': node.id}) }}" 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="#" 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">
<tbody>
<tr>
<td style="text-align:left;">
{# <h2>{{ title }}</h2> #}
{{ build }}
{{ 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;">
<tbody>