taxonomy-term.tpl.php 2.1 KB

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