function dhtml_menu_preprocess_block in DHTML Menu 6.2
Same name and namespace in other branches
- 6 dhtml_menu.module \dhtml_menu_preprocess_block()
Implementation of hook_preprocess(). Change the normal behaviour ('theming') of hook_block().
File
- ./
dhtml_menu.module, line 63 - dhtml_menu.module Allow click expansion of the menu tree via javascript, with graceful degradation.
Code
function dhtml_menu_preprocess_block(&$variables) {
$delta = $variables['block']->delta;
$module = $variables['block']->module;
$dhtml = variable_get('dhtml_menu_menus', array());
// If the menu has the DHTML menu option enabled,
// replace the entire block content with its DHTML equivalent
if (!empty($dhtml[$module][$delta])) {
$variables['block']->content = _dhtml_menu_build_block($module, $delta);
}
}