diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-04 03:57:19 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-04 03:57:19 +0000 |
commit | 37b78e02594e95ac059a69fe47ee62bf24ce5db5 (patch) | |
tree | 25c2d9222d30847680ddf664a1a8565868163408 /modules/node | |
parent | 89586bac91ecdd20255f615abd7993dc79092a50 (diff) | |
download | brdo-37b78e02594e95ac059a69fe47ee62bf24ce5db5.tar.gz brdo-37b78e02594e95ac059a69fe47ee62bf24ce5db5.tar.bz2 |
#646874 by sun and David_Rothstein: Remove assumptions about Contextual links and Shortcut modules from template files.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.module | 6 | ||||
-rw-r--r-- | modules/node/node.tpl.php | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index ba298bec2..469565a72 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1186,9 +1186,11 @@ function node_view($node, $view_mode = 'full') { '#node' => $node, '#view_mode' => $view_mode, ); - // Add contextual links for this node. + // Add contextual links for this node except for 'full' view mode. // @todo Make this configurable per view mode. - $build['#contextual_links']['node'] = array('node', array($node->nid)); + if ($view_mode != 'full') { + $build['#contextual_links']['node'] = array('node', array($node->nid)); + } // Allow modules to modify the structured node. drupal_alter('node_view', $build); diff --git a/modules/node/node.tpl.php b/modules/node/node.tpl.php index 1cbd06a7a..4c46a73c5 100644 --- a/modules/node/node.tpl.php +++ b/modules/node/node.tpl.php @@ -18,7 +18,6 @@ * - $node_url: Direct url of the current node. * - $terms: the themed list of taxonomy term links output from theme_links(). * - $display_submitted: whether submission information should be displayed. - * - $contextual_links (array): An array of contextual links for the node. * - $classes: String of classes that can be used to style contextually through * CSS. It can be manipulated through the variable $classes_array from * preprocess functions. The default values can be one or more of the following: @@ -32,6 +31,12 @@ * - node-promoted: Nodes promoted to the front page. * - node-sticky: Nodes ordered above other non-sticky nodes in teaser listings. * - node-unpublished: Unpublished nodes visible only to administrators. + * - $title_prefix (array): An array containing additional output populated by + * modules, intended to be displayed in front of the main title tag that + * appears in the template. + * - $title_suffix (array): An array containing additional output populated by + * modules, intended to be displayed after the main title tag that appears in + * the template. * * Other variables: * - $node: Full node object. Contains data that may not be safe. @@ -75,13 +80,11 @@ <?php print $user_picture; ?> - <?php if (!$page && !empty($contextual_links)): ?> - <?php print render($contextual_links); ?> - <?php endif; ?> - + <?php print render($title_prefix); ?> <?php if (!$page): ?> <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $node_title; ?></a></h2> <?php endif; ?> + <?php print render($title_suffix); ?> <?php if ($display_submitted || !empty($content['links']['terms'])): ?> <div class="meta"> |