There's no need for an extra query in hook_preprocess_page() to determine the name of the node type being viewed. Instead, you should use node_type_get_type() since that information is most likely already loaded and statically cached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstef’s picture

Status: Active » Needs review
FileSize
920 bytes

Patch