Logo Search packages:      
Sourcecode: bamboo version File versions  Download package

leftnav.php

<?php
if (!isset($nav_hide) || $nav_hide==false) {

      if (!isset($path)) 
            $path = $nav->getPathInfo($page);
                  
      $branchdepth = 2; // how much of the tree to show     
      if (preg_match("'.*/$'",$page->path))
            $branchdepth--;
      $depth = count($path);
      
      echo("<div id=root>\n");
      if ($page->path != '' || get('s')) {
            echo "<div>" . img('triangle-up.png') . " " . alink('/',"Home","class=nav") . "</div>\n"; 
      }
      if ($depth > $branchdepth) {
            $startlevel = $depth-$branchdepth;
            $path = array_reverse($path);
            while(count($path) > $branchdepth) {
                  $pathpart = array_pop($path);
                  echo("<div>" . img('triangle-up.png') . " " . alink($pathpart['path'] . '/',$pathpart['title'],"class=nav") . "</div>\n");
            }
      }
      else {
            $startlevel = 0;
      }
      echo("</div>\n");
      
      $tree = $nav->getTree($page,$startlevel);
      #debug($path);
      echo "\n<div id='list'><ol>\n";
      foreach($tree as $entry) {    
            echo (str_repeat('  ', $entry['level']+1));
            if ($entry['level'] === 'push')
                  echo "<ol>\n";
            elseif ($entry['level'] === 'pop')
                  echo "</ol>\n";
            else {      
                  $link = alink($entry['path'] . '/',$entry['title'],"class=nav");
                  if ($entry['selected']) $link = "<strong>$link</strong>";
                  echo "<li>$link</li>\n";
            }
      }
      echo "</ol></div>\n";
      #debug($tree);
      
      if (!$robot) {
            echo "<p><form action=\"$root\" method=get>search:<br><input name=s size=15 value=\"" . get('s') . "\"></form></p>";
      }
}
?>

Generated by  Doxygen 1.6.0   Back to index