Projet

Général

Profil

Paste
Télécharger (2,08 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / themes / bluemasters / comment-wrapper.tpl.php @ 6c38d829

1
<?php
2
// $Id: comment-wrapper.tpl.php,v 1.10 2010/05/05 06:41:22 webchick Exp $
3

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