diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-06-18 21:19:02 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-06-18 21:19:02 +0000 |
commit | 4d202669af4d2cc64244d70fe064aef6c50c1b23 (patch) | |
tree | 4918e7f5c8c3c1ee8246131ae9eb413ab33d7aef /modules/node/node.tpl.php | |
parent | 19d10a4e908810a53db4a08ed386c4cf1be935f1 (diff) | |
download | brdo-4d202669af4d2cc64244d70fe064aef6c50c1b23.tar.gz brdo-4d202669af4d2cc64244d70fe064aef6c50c1b23.tar.bz2 |
#455844 by yched, JohnAlbin, moshe weitzman, Frando, et al: Allow more granular theming of drupal_render()ed elements.
Diffstat (limited to 'modules/node/node.tpl.php')
-rw-r--r-- | modules/node/node.tpl.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/modules/node/node.tpl.php b/modules/node/node.tpl.php index 92e6c128e..49979a22d 100644 --- a/modules/node/node.tpl.php +++ b/modules/node/node.tpl.php @@ -7,7 +7,10 @@ * * Available variables: * - $title: the (sanitized) title of the node. - * - $content: Node body or teaser depending on $teaser flag. + * - $content: An array of node items. Use render($content) to print them all, or + * print a subset such as render($content['field_example']). Use + * hide($content['field_example]) to temporarily suppress the printing of a + * given element. * - $comments: the themed list of comments (if any). * - $picture: The authors picture of the node output from * theme_user_picture(). @@ -78,17 +81,22 @@ <span class="submitted"><?php print $submitted ?></span> <?php endif; ?> - <?php if ($terms): ?> - <div class="terms terms-inline"><?php print $terms ?></div> + <?php if (!empty($content['links']['terms'])): ?> + <div class="terms terms-inline"><?php render($content['links']['terms']) ?></div> <?php endif;?> </div> <div class="content"> - <?php print $content ?> + <?php + // We hide the comments and links now so that we can render them later. + hide($content['comments']); + hide($content['links']); + render($content); + ?> </div> - <?php print $links; ?> + <?php render($content['links']); ?> - <?php print $comments; ?> + <?php render($content['comments']); ?> -</div>
\ No newline at end of file +</div> |