8.5.x node.module node_is_page(NodeInterface $node)
8.0.x node.module node_is_page(NodeInterface $node)
8.1.x node.module node_is_page(NodeInterface $node)
8.2.x node.module node_is_page(NodeInterface $node)
8.3.x node.module node_is_page(NodeInterface $node)
8.4.x node.module node_is_page(NodeInterface $node)
8.6.x node.module node_is_page(NodeInterface $node)
7.x node.module node_is_page($node)

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.

1 call to node_is_page()
template_preprocess_node in modules/node/node.module
Processes variables for node.tpl.php

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;
}