forum-submitted.html.twig

Default theme implementation 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.

See also

template_preprocess()

template_preprocess_forum_submitted()

2 theme calls to forum-submitted.html.twig
template_preprocess_forum_list in drupal/core/modules/forum/forum.module
Prepares variables for forum list templates.
template_preprocess_forum_topic_list in drupal/core/modules/forum/forum.module
Prepares variables for forum topic list templates.

File

drupal/core/modules/forum/templates/forum-submitted.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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()
  15. * @see template_preprocess_forum_submitted()
  16. *
  17. * @ingroup themeable
  18. */
  19. #}
  20. {% if time %}
  21. <span class="submitted">{{ 'By !author @time ago'|t({'@time': time, '!author': author}) }}</span>
  22. {% else %}
  23. {{ 'n/a'|t }}
  24. {% endif %}

Related topics