Elgg  Version 1.9
section.php
Go to the documentation of this file.
1 <?php
13 $items = elgg_extract('items', $vars, array());
14 $headers = elgg_extract('show_section_headers', $vars, false);
15 $class = elgg_extract('class', $vars, '');
16 $item_class = elgg_extract('item_class', $vars, '');
17 
18 if ($headers) {
19  $name = elgg_extract('name', $vars);
20  $section = elgg_extract('section', $vars);
21  echo '<h2>' . elgg_echo("menu:$name:header:$section") . '</h2>';
22 }
23 
24 echo "<ul class=\"$class\">";
25 
26 if (is_array($items)) {
27  foreach ($items as $menu_item) {
28  echo elgg_view('navigation/menu/elements/item', array(
29  'item' => $menu_item,
30  'item_class' => $item_class,
31  ));
32  }
33 }
34 
35 echo '</ul>';
$class
Definition: section.php:15
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1464
$headers
Definition: section.php:14
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$items
Menu group.
Definition: section.php:13
$item_class
Definition: section.php:16
if(file_exists($welcome)) $vars
Definition: upgrade.php:93