You are here

function context_omega_omega_layout_alter in Context omega 7

Implements hook_omega_layout_alter().

File

./context_omega.module, line 37
Main module file for the Omega context integration module.

Code

function context_omega_omega_layout_alter(&$layout) {
  if ($plugin = context_get_plugin('reaction', 'block')) {
    $reaction_layout = $plugin
      ->get_active_layout();
    if (!empty($reaction_layout) && array_key_exists($reaction_layout, context_omega_get_layouts())) {

      // Override the active Omega layout with the one specified by one of the
      // active contexts. If none of the active contexts specified a layout the
      // active Omega layout stays unaffected.
      $layout = $reaction_layout;
    }
  }
}