forums.tpl.php

  1. 7.x drupal-7.x/modules/forum/forums.tpl.php
  2. 6.x drupal-6.x/modules/forum/forums.tpl.php

forums.tpl.php Default theme implementation to display a forum which may contain forum containers as well as forum topics.

Variables available:

  • $links: An array of links that allow a user to post new forum topics. It may also contain a string telling a user they must log in in order to post.
  • $forums: The forums to display (as processed by forum-list.tpl.php)
  • $topics: The topics to display (as processed by forum-topic-list.tpl.php)
  • $forums_defined: A flag to indicate that the forums are configured.

See also

template_preprocess_forums()

theme_forums()

2 theme calls to forums.tpl.php
forum_page in drupal-6.x/modules/forum/forum.pages.inc
Menu callback; prints a forum listing.
template_preprocess_forums in drupal-6.x/modules/forum/forum.module
Process variables for forums.tpl.php

File

drupal-6.x/modules/forum/forums.tpl.php
View source
  1. <?php
  2. /**
  3. * @file forums.tpl.php
  4. * Default theme implementation to display a forum which may contain forum
  5. * containers as well as forum topics.
  6. *
  7. * Variables available:
  8. * - $links: An array of links that allow a user to post new forum topics.
  9. * It may also contain a string telling a user they must log in in order
  10. * to post.
  11. * - $forums: The forums to display (as processed by forum-list.tpl.php)
  12. * - $topics: The topics to display (as processed by forum-topic-list.tpl.php)
  13. * - $forums_defined: A flag to indicate that the forums are configured.
  14. *
  15. * @see template_preprocess_forums()
  16. * @see theme_forums()
  17. */
  18. ?>
  19. <?php if ($forums_defined): ?>
  20. <div id="forum">
  21. <?php print theme('links', $links); ?>
  22. <?php print $forums; ?>
  23. <?php print $topics; ?>
  24. </div>
  25. <?php endif; ?>