taxonomy-term.tpl.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display a term.
  5. *
  6. * Available variables:
  7. * - $name: the (sanitized) name of the term.
  8. * - $content: An array of items for the content of the term (fields and
  9. * description). Use render($content) to print them all, or print a subset
  10. * such as render($content['field_example']). Use
  11. * hide($content['field_example']) to temporarily suppress the printing of a
  12. * given element.
  13. * - $term_url: Direct URL of the current term.
  14. * - $term_name: Name of the current term.
  15. * - $classes: String of classes that can be used to style contextually through
  16. * CSS. It can be manipulated through the variable $classes_array from
  17. * preprocess functions. The default values can be one or more of the following:
  18. * - taxonomy-term: The current template type, i.e., "theming hook".
  19. * - vocabulary-[vocabulary-name]: The vocabulary to which the term belongs to.
  20. * For example, if the term is a "Tag" it would result in "vocabulary-tag".
  21. *
  22. * Other variables:
  23. * - $term: Full term object. Contains data that may not be safe.
  24. * - $view_mode: View mode, e.g. 'full', 'teaser'...
  25. * - $page: Flag for the full page state.
  26. * - $classes_array: Array of html class attribute values. It is flattened
  27. * into a string within the variable $classes.
  28. * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
  29. * teaser listings.
  30. * - $id: Position of the term. Increments each time it's output.
  31. * - $is_front: Flags true when presented in the front page.
  32. * - $logged_in: Flags true when the current user is a logged-in member.
  33. * - $is_admin: Flags true when the current user is an administrator.
  34. *
  35. * @see template_preprocess()
  36. * @see template_preprocess_taxonomy_term()
  37. * @see template_process()
  38. *
  39. * @ingroup themeable
  40. */
  41. ?>
  42. <div id="taxonomy-term-<?php print $term->tid; ?>" class="<?php print $classes; ?>">
  43. <?php if (!$page): ?>
  44. <h2><a href="<?php print $term_url; ?>"><?php print $term_name; ?></a></h2>
  45. <?php endif; ?>
  46. <div class="content">
  47. <?php print render($content); ?>
  48. </div>
  49. </div>