From 37b78e02594e95ac059a69fe47ee62bf24ce5db5 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 4 Jan 2010 03:57:19 +0000 Subject: #646874 by sun and David_Rothstein: Remove assumptions about Contextual links and Shortcut modules from template files. --- modules/node/node.module | 6 ++++-- modules/node/node.tpl.php | 13 ++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'modules/node') 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 @@ - - - - + > +
-- cgit v1.2.3