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