You are here

invite-email-preview.html.twig in Open Social 8.9

The default template file for e-mails.

Available variables:

  • subject: The subject.
  • body: The message content.
  • message: The $message array created and used in the mail building procedure. Its content varies between cases, but typically contains at least the following elements:

    • id: The message identifier.
    • module: The module that handles the building of the message.
    • key: The key of the message.
    • to: The recipient email address.
    • from: The email address of the sender.
    • langcode: The langcode to use to compose the e-mail.
    • params: The message parameters.

This template may be overriden by module and/or mail key, using any of the following template names:

  • swiftmailer.html.twig: global, used by default.
  • swiftmailer--mymodule.html.twig: only emails sent by the module "mymodule".
  • swiftmailer--mymodule--test.html.twig: only emails by the module "mymodule" with key "test".

File

themes/socialbase/templates/email/invite-email-preview.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * The default template file for e-mails.
  5. *
  6. * Available variables:
  7. * - subject: The subject.
  8. * - body: The message content.
  9. * - message: The $message array created and used in the mail building
  10. * procedure. Its content varies between cases, but typically contains at
  11. * least the following elements:
  12. * - id: The message identifier.
  13. * - module: The module that handles the building of the message.
  14. * - key: The key of the message.
  15. * - to: The recipient email address.
  16. * - from: The email address of the sender.
  17. * - langcode: The langcode to use to compose the e-mail.
  18. * - params: The message parameters.
  19. *
  20. * This template may be overriden by module and/or mail key, using any of the
  21. * following template names:
  22. * - swiftmailer.html.twig: global, used by default.
  23. * - swiftmailer--mymodule.html.twig: only emails sent by the module "mymodule".
  24. * - swiftmailer--mymodule--test.html.twig: only emails by the module
  25. * "mymodule" with key "test".
  26. *
  27. * @see template_preprocess()
  28. * @see template_preprocess_swiftmailer()
  29. *
  30. * @ingroup themeable
  31. */
  32. #}
  33. {{ attach_library('socialbase/email-preview') }}
  34. <div class="email-preview">
  35. <div class="email-preview--content">
  36. <div class="subject">
  37. {% trans %}Subject{% endtrans %}: {{ subject }}
  38. </div>
  39. <div class="email-preview--inside">
  40. <span class="preheader"></span>
  41. <div class="header">
  42. <img src="{{ logo }}" alt="Logo" class="logo" />
  43. </div>
  44. {% if heading %}
  45. <div class="postheader">
  46. {{ heading }}
  47. </div>
  48. {% endif %}
  49. <div class="main">
  50. <div class="wrapper">
  51. {% if header %}
  52. <div>
  53. {{ header }}
  54. </div>
  55. {% endif %}
  56. <div>
  57. {{ body|raw }}
  58. </div>
  59. {% if footer %}
  60. <div>
  61. {{ footer }}
  62. </div>
  63. {% endif %}
  64. </div>
  65. </div>
  66. <!-- START FOOTER -->
  67. <div class="footer">
  68. <div class="content-block">
  69. <strong class="brand">
  70. {% if site_link %}
  71. <a href="{{ base_url }}">{{ site_name }}</a>
  72. {% else %}
  73. {{ site_name }}
  74. {% endif %}
  75. </strong>
  76. {% if site_slogan %}
  77. <br />
  78. <span class="tagline">{{ site_slogan }}</span>
  79. {% endif %}
  80. </div>
  81. <div class="content-block powered-by">
  82. Copyright &copy; {{ "now"|date("Y") }}.
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="helper">
  88. {{ helper|raw }}
  89. </div>
  90. </div>