Same name and namespace in other branches
  1. 10 core/modules/node/node.module \node_is_page()
  2. 8.9.x core/modules/node/node.module \node_is_page()
  3. 9 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.

6 calls to node_is_page()
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().
hook_view in modules/node/node.api.php
Display a node.
node_view in modules/node/node.module
Generates an array for rendering the given node.

... See full list

File

modules/node/node.module, line 1483
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_is_page($node) {
  $page_node = menu_get_object();
  return !empty($page_node) ? $page_node->nid == $node->nid : FALSE;
}