You are here

private-message.html.twig in Open Social 8.8

Default theme implementation to display a private message.

Available variables:

  • private_message: The private message entity with limited access to object properties and methods.
  • content: All private message items. Use {{ content }} to print them all, or print a subset such as {{ content.field_example }}. Use {{ content|without('field_example') }} to temporarily suppress the printing of a given child element.
  • url: Direct URL of the current private message.
  • view_mode: View mode; for example, "teaser" or "full".
  • logged_in: Flag for authenticated user status. Will be true when the current user is a logged-in member.

File

themes/socialbase/templates/private_message/private-message.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a private message.
  5. *
  6. * Available variables:
  7. * - private_message: The private message entity
  8. * with limited access to object properties and methods.
  9. * - content: All private message items. Use {{ content }} to print them all,
  10. * or print a subset such as {{ content.field_example }}. Use
  11. * {{ content|without('field_example') }} to temporarily suppress the printing
  12. * of a given child element.
  13. * - url: Direct URL of the current private message.
  14. * - view_mode: View mode; for example, "teaser" or "full".
  15. * - logged_in: Flag for authenticated user status. Will be true when the
  16. * current user is a logged-in member.
  17. *
  18. * @see template_preprocess_private_message()
  19. *
  20. * @ingroup themeable
  21. */
  22. #}
  23. {% if view_mode == 'inbox' %}
  24. {{ content.created }}
  25. <div class="message__excerpt">
  26. {{ content.owner }}
  27. {{ content.message }}
  28. </div>
  29. {% else %}
  30. {{ content }}
  31. {% endif %}