function template_preprocess_tb_megamenu_nav in The Better Mega Menu 7
Same name and namespace in other branches
- 8 tb_megamenu.module \template_preprocess_tb_megamenu_nav()
- 2.x tb_megamenu.module \template_preprocess_tb_megamenu_nav()
1 string reference to 'template_preprocess_tb_megamenu_nav'
- tb_megamenu_theme in ./
tb_megamenu.module - Implements hook_theme().
File
- ./
tb_megamenu.themes.inc, line 60
Code
function template_preprocess_tb_megamenu_nav(&$vars) {
$items = $vars['items'];
$level = $vars['level'];
$lis = array();
foreach ($items as $item) {
if (!$item['link']['hidden']) {
$lis[] = theme('tb_megamenu_item', array(
'menu_name' => $vars['menu_name'],
'level' => $level + 1,
'item' => $item,
'menu_config' => $vars['menu_config'],
'block_config' => $vars['block_config'],
'trail' => $vars['trail'],
'section' => $vars['section'],
));
}
}
$vars['lis'] = implode("\n", $lis);
$vars['classes_array'][] = "nav";
$vars['classes_array'][] = "level-" . $level;
$vars['classes_array'][] = "items-" . count($items);
}