function hook_regions_region_alter in Regions 6
Same name and namespace in other branches
- 7 regions.api.php \hook_regions_region_alter()
Hook allowing other modules to alter the region array before the each element is concatenated into a single HTML string.
Parameters
array $region: A keyed array of region HTML elements and strings, containing:
- start: the region DIV with the $region_name as ID and 'regions' CLASS.
- blocks: a string containing the themed blocks for this region, as returned by theme_block(). @see hook_regions_blocks_alter()
- end: a closing DIV.
string $region_name:
See also
1 invocation of hook_regions_region_alter()
- regions_footer in ./
regions.module - Implementation of hook_footer().
File
- ./
regions.api.php, line 49 - Hooks provided by Regions.
Code
function hook_regions_region_alter(&$region, $region_name) {
// Example to add an inner DIV to the region markup.
$new_markup = array(
'start' => $region['start'],
'inner' => '<div id="' . $region_name . '-inner">',
'blocks' => $region['blocks'],
'inner_end' => '</div>',
'end' => $region['end'],
);
$region = $new_markup;
}