You are here

forum-submitted.html.twig in Drupal 9

Theme override for a forum post submission string.

The submission string indicates when and by whom a topic was submitted.

Available variables:

  • author: The author of the post.
  • time: How long ago the post was created.
  • topic: An object with the raw data of the post. Potentially unsafe. Be sure to clean this data before printing.

File

core/themes/seven/templates/classy/user/forum-submitted.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a forum post submission string.
  5. *
  6. * The submission string indicates when and by whom a topic was submitted.
  7. *
  8. * Available variables:
  9. * - author: The author of the post.
  10. * - time: How long ago the post was created.
  11. * - topic: An object with the raw data of the post. Potentially unsafe. Be
  12. * sure to clean this data before printing.
  13. *
  14. * @see template_preprocess_forum_submitted()
  15. */
  16. #}
  17. {% if time %}
  18. <span class="submitted">{% trans %}By {{ author }} {{ time }} ago{% endtrans %}</span>
  19. {% else %}
  20. {{ 'n/a'|t }}
  21. {% endif %}