示例#1
0
 /**
  * Echo the hierarchy
  *
  * Overrides the default tagShow() to disable the page indexing
  * if the current selected row is a container. In $params you can
  * specify the custom action to use: if left empty, the default
  * action (configured for this module) will be used.
  */
 protected function tagShow($params)
 {
     if (is_null($renderer = $this->_getRenderer($params))) {
         return null;
     }
     if ($renderer->isCurrentContainer()) {
         // If the current row is a container, don't index this page
         TIP_Application::setRobots(false, null);
     }
     return $renderer->toHtml();
 }
示例#2
0
 /**
  * Render this chronology in XHTML format
  * @return string The rendered html
  */
 public function toHtml()
 {
     if (!$this->_render()) {
         return '';
     }
     require_once 'HTML/Menu.php';
     $model =& new HTML_Menu($this->_tree);
     $model->forceCurrentUrl(TIP::getRequestUri());
     $renderer =& TIP_Renderer::getMenu($this->levels);
     $model->render($renderer, 'sitemap');
     $html = $renderer->toHtml();
     if ($renderer->isCurrentContainer()) {
         // If the current row is a container, don't index this page
         TIP_Application::setRobots(false, null);
     }
     return $html;
 }