You are here

function context_context_page_condition in Context 6.2

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

Implementation of hook_context_page_condition().

File

./context.core.inc, line 696

Code

function context_context_page_condition() {

  // See if any contexts will be set by computing this condition.
  $map = context_condition_map();
  if (!empty($map['menu_trail'])) {

    // Menu trail condition integration
    $trail = menu_get_active_trail();
    foreach ($trail as $item) {
      if (!empty($item['href'])) {
        context_set_by_condition('menu_trail', $item['href']);
      }
    }
  }
}