You are here

function context_nodeapi in Context 6

Same name and namespace in other branches
  1. 6.3 context.core.inc \context_nodeapi()
  2. 6.2 context.core.inc \context_nodeapi()

Implementation of hook_nodeapi().

File

./context.core.inc, line 225

Code

function context_nodeapi(&$node, $op, $teaser, $page) {
  if ($op == 'view' && $page && menu_get_object() === $node) {

    // Implementation of context_set_by_condition for node.
    context_set_by_condition('node', $node->type);

    // Implementation of context_set_by_condition for book.
    if (module_exists('book') && isset($node->book)) {
      if ($node->book['menu_name']) {
        context_set_by_condition('book', $node->book['menu_name']);
      }
    }
  }
}