function lightbox2_preprocess_page in Lightbox2 6
Same name and namespace in other branches
- 8 lightbox2.module \lightbox2_preprocess_page()
- 7.2 lightbox2.module \lightbox2_preprocess_page()
- 7 lightbox2.module \lightbox2_preprocess_page()
Preprocess function for template by theme('page').
File
- ./
lightbox2.module, line 1151 - Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.
Code
function lightbox2_preprocess_page(&$variables) {
if (arg(0) != 'node' || arg(2) != 'lightbox2') {
return;
}
//Overwrite template_preprocess_page() region settings.
global $theme;
// Retrieve all block regions.
$regions = system_region_list($theme);
// Remove all region content assigned via blocks.
foreach (array_keys($regions) as $region) {
if ($region != 'content') {
$variables[$region] = NULL;
}
}
// Set up layout variable to none.
$variables['layout'] = 'none';
//additional template files for e.g. page-node-lightbox.tpl.php are allready implemented through template_preprocess_page()
}