From a25b60541dad30baa72736a3b00c1a0267b6e1e8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 17 Aug 2010 16:20:08 +0000 Subject: =?UTF-8?q?-=20Patch=20#721754=20by=20Shellingfox,=20lotyrin,=20Da?= =?UTF-8?q?mien=20Tournoud,=20chx,=20hefox,=20G=C3=A1bor=20Hojtsy,=20pureg?= =?UTF-8?q?in:=20a=20node=20cannot=20be=20displayed=20in=20different=20vie?= =?UTF-8?q?w=20mode=20on=20its=20own=20page.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/node/node.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index f15557028..1b646b43e 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1222,7 +1222,7 @@ function node_view($node, $view_mode = 'full') { // displayed on its own page. Modules may alter this behavior (for example, // to restrict contextual links to certain view modes) by implementing // hook_node_view_alter(). - if (!empty($node->nid) && !node_is_page($node)) { + if (!empty($node->nid) && !($view_mode == 'full' && node_is_page($node))) { $build['#contextual_links']['node'] = array('node', array($node->nid)); } @@ -1355,7 +1355,7 @@ function template_preprocess_node(&$variables) { $uri = entity_uri('node', $node); $variables['node_url'] = url($uri['path'], $uri['options']); $variables['title'] = check_plain($node->title); - $variables['page'] = node_is_page($node); + $variables['page'] = $variables['view_mode'] == 'full' && node_is_page($node); if (!empty($node->in_preview)) { unset($node->content['links']); -- cgit v1.2.3