function node_is_page
Same name in other branches
- 9 core/modules/node/node.module \node_is_page()
- 8.9.x core/modules/node/node.module \node_is_page()
- 10 core/modules/node/node.module \node_is_page()
- 11.x core/modules/node/node.module \node_is_page()
Returns whether the current page is the full page view of the passed-in node.
Parameters
$node: A node object.
Return value
The ID of the node if this is a full page view, otherwise FALSE.
9 calls to node_is_page()
- bartik_preprocess_node in themes/
bartik/ template.php - Override or insert variables into the node template.
- blog_view in modules/
blog/ blog.module - Implements hook_view().
- book_node_view_link in modules/
book/ book.module - Adds relevant book links to the node's links.
- comment_node_view in modules/
comment/ comment.module - Implements hook_node_view().
- forum_node_view in modules/
forum/ forum.module - Implements hook_node_view().
File
-
modules/
node/ node.module, line 1483
Code
function node_is_page($node) {
$page_node = menu_get_object();
return !empty($page_node) ? $page_node->nid == $node->nid : FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.