Projet

Général

Profil

Paste
Télécharger (1,98 ko) Statistiques
| Branche: | Révision:

root / drupal7 / modules / comment / comment-wrapper.tpl.php @ 01dfd3b5

1
<?php
2

    
3
/**
4
 * @file
5
 * Default theme implementation to provide an HTML container for comments.
6
 *
7
 * Available variables:
8
 * - $content: The array of content-related elements for the node. Use
9
 *   render($content) to print them all, or
10
 *   print a subset such as render($content['comment_form']).
11
 * - $classes: String of classes that can be used to style contextually through
12
 *   CSS. It can be manipulated through the variable $classes_array from
13
 *   preprocess functions. The default value has the following:
14
 *   - comment-wrapper: The current template type, i.e., "theming hook".
15
 * - $title_prefix (array): An array containing additional output populated by
16
 *   modules, intended to be displayed in front of the main title tag that
17
 *   appears in the template.
18
 * - $title_suffix (array): An array containing additional output populated by
19
 *   modules, intended to be displayed after the main title tag that appears in
20
 *   the template.
21
 *
22
 * The following variables are provided for contextual information.
23
 * - $node: Node object the comments are attached to.
24
 * The constants below the variables show the possible values and should be
25
 * used for comparison.
26
 * - $display_mode
27
 *   - COMMENT_MODE_FLAT
28
 *   - COMMENT_MODE_THREADED
29
 *
30
 * Other variables:
31
 * - $classes_array: Array of html class attribute values. It is flattened
32
 *   into a string within the variable $classes.
33
 *
34
 * @see template_preprocess_comment_wrapper()
35
 *
36
 * @ingroup themeable
37
 */
38
?>
39
<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
40
  <?php if ($content['comments'] && $node->type != 'forum'): ?>
41
    <?php print render($title_prefix); ?>
42
    <h2 class="title"><?php print t('Comments'); ?></h2>
43
    <?php print render($title_suffix); ?>
44
  <?php endif; ?>
45

    
46
  <?php print render($content['comments']); ?>
47

    
48
  <?php if ($content['comment_form']): ?>
49
    <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
50
    <?php print render($content['comment_form']); ?>
51
  <?php endif; ?>
52
</div>