function ctools_page_alter in Chaos Tool Suite (ctools) 7
Implements hook_page_alter().
Last ditch attempt to remove sidebar regions if the "no blocks" functionality has been activated.
See also
File
- ./
ctools.module, line 803 - CTools primary module file.
Code
function ctools_page_alter(&$page) {
$check = drupal_static('ctools_set_no_blocks', TRUE);
if (!$check) {
foreach ($page as $region_id => $region) {
// @todo -- possibly we can set configuration for this so that users can
// specify which blocks will not get rendered.
if (strpos($region_id, 'sidebar') !== FALSE) {
unset($page[$region_id]);
}
}
}
$page['#post_render'][] = 'ctools_page_token_processing';
}