Location: PHPKode > projects > Teampopor > teampopor-0.5/teampopor/themes/default/blocks/menu.tpl.php
<?php
/**
 * .menu
 *
 * @param $menu
 *   The menu array, each array has class, title, submenu
 */

global $theme;
add_js(get_path('theme', $theme) . '/blocks/menu.js');
add_css(get_path('theme', $theme) . '/blocks/menu.css');
?>
<ul class="menu">
  <?php foreach($menu as $item) { ?>
  <?php
  if (!is_array($item) || !isset($item['title'])) {
    $item = array('title' => $item);
  }
  ?>
  <?php if (is_array($item['title'])) { ?>
  <li class="tab<?php print isset($item['class']) ? ' ' . $item['class'] : '' ?>">
    <?php
    $subitem = array_shift($item['title']);
    if (is_string($subitem)) {
      $subitem = array('title' => $subitem);
    }
    ?>
    <span class="title"><?php print $subitem['title'] ?></span>
    <ul class="submenu">
      <li class="title<?php print isset($subitem['class']) ? ' ' . $subitem['class'] : '' ?>">
        <span class='title'><?php print $subitem['title'] ?></span>
      </li>
      <?php foreach($item['title'] as $subitem) { ?>
      <?php
      if (is_string($subitem)) {
        $subitem = array('title' => $subitem);
      }
      ?>
      <li<?php print isset($subitem['class']) ? ' class="' . $subitem['class'] . '"' : '' ?>>
        <?php print $subitem['title'] ?>
      </li>
      <?php } ?>
    </ul>
  </li>
  <?php } else { ?>
  <li<?php print isset($item['class']) ? ' class="' . $item['class'] . '"' : '' ?>>
    <?php print $item['title'] ?>
  </li>
  <?php } ?>
  <?php } ?>
</ul>
Return current item: Teampopor