Created
December 7, 2012 13:54
-
-
Save waako/4233397 to your computer and use it in GitHub Desktop.
Fore a region to render if it has a template file (region--regionnname.tpl.php) even if it is empty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implement a page alter to force certain regions to display even if no blocks exist | |
function THEMENAME_page_alter(&$page) { | |
foreach (system_region_list($GLOBALS['theme'], REGIONS_ALL) as $region => $name) { | |
if (in_array($region, array('REGIONNAME'))) { | |
$page['REGIONNAME'] = array( | |
'#region' => 'REGIONNAME', | |
'#weight' => '-10', | |
'#theme_wrappers' => array('region'), | |
); | |
} | |
} | |
} | |
// Don't forget to remove the if content not empty statement in the region tpl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment