Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Functions
is_node_page()
Find out if the current page is a node page.
- Calling parameters
- none
- Return
- TRUE
- if the page is a node,
- FALSE
- if it is another page.
node_load_current()
Grab the current 'active' node. An active node is the one node 123 as shown on page with path node/123, or its aliased path(s).
- Calling parameters
- none
- Return
- $node object if the page is a node, empty $node object if it is not a node, or if we cannot see it, for any valid reason.