function template_preprocess_tb_megamenu_subnav in The Better Mega Menu 7
Same name and namespace in other branches
- 8 tb_megamenu.module \template_preprocess_tb_megamenu_subnav()
- 2.x tb_megamenu.module \template_preprocess_tb_megamenu_subnav()
1 string reference to 'template_preprocess_tb_megamenu_subnav'
- tb_megamenu_theme in ./
tb_megamenu.module - Implements hook_theme().
File
- ./
tb_megamenu.themes.inc, line 290
Code
function template_preprocess_tb_megamenu_subnav(&$vars) {
$col = $vars['col'];
// $items = $vars['items'];
$level = $vars['level'];
$lis = array();
foreach ($col as $tb_item) {
$item = tb_megamenu_get_menu_item($vars['menu_name'], $tb_item['mlid']);
$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'][] = "mega-nav";
$vars['classes_array'][] = "level-" . $level;
$vars['classes_array'][] = "items-" . count($col);
}