blob: 0fa391433edf7f04810515e35f7b016c3db6d166 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
/**
* Default menu
*
* @uses $vars['name']
* @uses $vars['menu']
* @uses $vars['class']
* @uses $vars['show_section_headers']
*/
// we want css classes to use dashes
$vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']);
$headers = elgg_extract('show_section_headers', $vars, false);
$class = "elgg-menu elgg-menu-{$vars['name']}";
if (isset($vars['class'])) {
$class .= " {$vars['class']}";
}
foreach ($vars['menu'] as $section => $menu_items) {
echo elgg_view('navigation/menu/elements/section', array(
'items' => $menu_items,
'class' => "$class elgg-menu-{$vars['name']}-$section",
'section' => $section,
'name' => $vars['name'],
'show_section_headers' => $headers
));
}
|