postoffice-1.0.x-dev/extensions/postoffice_compat/templates/postoffice-compat-email-contact-personal.html.twig
extensions/postoffice_compat/templates/postoffice-compat-email-contact-personal.html.twig
{#
/**
* @file
* Default theme implementation for personal contact form messages generated by the core contact module.
*
* Here are some theme hook suggestions that can be used for personal contact form email:
* - postoffice-compat-email-contact-personal--en.html.twig
* - postoffice-compat-email-contact-personal.html.twig
*
* Available variables:
* - message: The message as a render array.
* - copy: TRUE if this is a copy to the sender.
* - email: The email object. The ContactMessageInterface and SiteEmailInterface
* determine what data is available to twig through this variable.
* - langcode: The language code.
*
* @see \Drupal\postoffice\Email\SiteEmailInterface
* @see \Drupal\postoffice_compat\Email\ContactMessageEmailInterface
* @see \Drupal\postoffice_compat\Email\ContactPersonalEmailInterface
* @ingroup themeable
*/
#}
{% set t_args = {
'@sender-name': email.senderName,
':sender-url': email.senderCanonicalUrl ?? ('mailto:' ~ email.senderEmail),
'@recipient-name': email.recipientName,
':recipient-edit-url': email.recipientEditUrl,
'@site-name': email.siteName,
}%}
{% embed 'postoffice-compat-email-body-contact.html.twig' %}
{% block intro %}
<p>{{ 'Hello @recipient-name,'|t(t_args)}}</p>
<p>{{ '<a href=":sender-url">@sender-name</a> has sent you a message via your contact form at @site-name.'|t(t_args)}}</p>
<p>{{ 'If you don\'t want to receive such emails, you can change your settings <a href=":recipient-edit-url">on your profile</a>.'|t(t_args)}}</p>
{% endblock %}
{% block message %}
{{ message }}
{% endblock %}
{% endembed %}
