Project

General

Profile

Paste
Download (2.09 KB) Statistics
| Branch: | Revision:

root / drupal7 / modules / taxonomy / taxonomy-term.tpl.php @ b0dc3a2e

1
<?php
2

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

    
46
  <?php if (!$page): ?>
47
    <h2><a href="<?php print $term_url; ?>"><?php print $term_name; ?></a></h2>
48
  <?php endif; ?>
49

    
50
  <div class="content">
51
    <?php print render($content); ?>
52
  </div>
53

    
54
</div>