/[drupal]/drupal/modules/comment/comment-wrapper.tpl.php
ViewVC logotype

Contents of /drupal/modules/comment/comment-wrapper.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download) (as text)
Fri Sep 11 06:48:02 2009 UTC (2 months, 2 weeks ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-9, HEAD
Changes since 1.7: +2 -2 lines
File MIME type: text/x-php
- Patch #569362 by scor, effulgentsia, catch: add attributes and title_attributes() variables for tpl files so that RDFa and Microformats can be implemented.
1 <?php
2 // $Id: comment-wrapper.tpl.php,v 1.7 2009/07/28 10:09:25 dries Exp $
3
4 /**
5 * @file
6 * Default theme implementation to wrap 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 *
17 * The following variables are provided for contextual information.
18 * - $node: Node object the comments are attached to.
19 * The constants below the variables show the possible values and should be
20 * used for comparison.
21 * - $display_mode
22 * - COMMENT_MODE_FLAT
23 * - COMMENT_MODE_THREADED
24 *
25 * Other variables:
26 * - $classes_array: Array of html class attribute values. It is flattened
27 * into a string within the variable $classes.
28 *
29 * @see template_preprocess_comment_wrapper()
30 * @see theme_comment_wrapper()
31 */
32 ?>
33 <div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
34 <?php if ($node->type != 'forum'): ?>
35 <h2 class="comments"><?php print t('Comments'); ?></h2>
36 <?php endif; ?>
37
38 <?php print render($content['comments']); ?>
39
40 <?php if ($content['comment_form']): ?>
41 <h2 class="title"><?php print t('Post new comment'); ?></h2>
42 <div>
43 <?php print render($content['comment_form']); ?>
44 </div>
45 <?php endif; ?>
46 </div>

  ViewVC Help
Powered by ViewVC 1.1.2