Exemplo n.º 1
0
 function displaynode_h3list($start = 0, $h = 3)
 {
     if ($start != '0' && $start != '') {
         $this->bulletlist .= $this->depth == 1 ? "<h{$h}>" : "<li>";
         $class = $this->classname[$start] == '' ? '' : ' class="' . $this->classname[$start] . '"';
         $url = $this->urls[$start];
         if ($this->onclicks[$start] != '') {
             $onclick = ' onclick="' . $this->onclicks[$start] . '"';
         } else {
             $onclick = "";
         }
         if ($url != '') {
             $this->bulletlist .= "<a href=\"{$url}\"" . $onclick . $class . ">";
         }
         //start link
         $this->bulletlist .= $this->htmls[$start] ? $this->htmls[$start] : $this->nodes[$start];
         if ($url != '') {
             $this->bulletlist .= "</a>";
         }
         //finish link
         $this->bulletlist .= $this->depth == 1 ? "</h{$h}>" : "";
     }
     if (isset($this->children[$start]) && is_array($this->children[$start])) {
         $this->depth = $this->depth + 1;
         if ($this->depth > 1) {
             $this->bulletlist .= "<ul" . JOJO::onlyif($this->liststyle, ' style="list-style-type: ' . $this->liststyle . ';"') . ">\n";
         }
         for ($i = 0; $i < count($this->children[$start]); $i++) {
             $this->displaynode_h3list($this->children[$start][$i], $h);
         }
         if ($this->depth > 1) {
             $this->bulletlist .= "</ul>\n";
         }
         $this->depth = $this->depth - 1;
     }
     if ($start != '0' && $start != '') {
         //$this->bulletlist .= "</li>\n";
         $this->bulletlist .= $this->depth == 1 ? "" : "</li>";
     }
 }