postoffice-1.0.x-dev/extensions/postoffice_compat/templates/postoffice-compat-email-contact-page.html.twig

extensions/postoffice_compat/templates/postoffice-compat-email-contact-page.html.twig
{#
/**
 * @file
 * Default theme implementation for site contact form messages generated by the core contact module.
 *
 * Here are some theme hook suggestions that can be used for site contact form email:
 * - postoffice-compat-email-contact-page--feedback--en.html.twig
 * - postoffice-compat-email-contact-page--feedback.html.twig
 * - postoffice-compat-email-contact-page--en.html.twig
 * - postoffice-compat-email-contact-page.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 ContactFormEmailInterface,
 *     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\ContactFormEmailInterface
 * @see \Drupal\postoffice_compat\Email\ContactMessageEmailInterface
 *
 * @ingroup themeable
 */
#}

{% set t_args = {
  '@sender-name': email.senderName,
  ':sender-url': email.senderCanonicalUrl ?? ('mailto:' ~ email.senderEmail),
  ':form-url': email.contactFormUrl,
}%}

{% embed 'postoffice-compat-email-body-contact.html.twig' %}

  {% block intro %}
    <p>{{ '<a href=":sender-url">@sender-name</a> sent a message using the <a href=":form-url">contact form</a>.'|t(t_args)}}</p>
  {% endblock %}

  {% block message %}
    {{ message }}
  {% endblock %}

{% endembed %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc