DocTocRenderer: no anchor for toplevel entries

Makes links look better and hides anchor-encoding issues at least on
top level
This commit is contained in:
Thomas Gelf 2015-11-13 09:37:02 +01:00
parent 3e93d62795
commit 5324875ab6
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ class DocTocRenderer extends DocRenderer
);
$url = $view->url($path);
/** @var \Icinga\Web\Url $url */
$url->setAnchor($this->encodeAnchor($section->getId()));
if ($this->getDepth() > 0) {
$url->setAnchor($this->encodeAnchor($section->getId()));
}
$urlAttributes = array(
'data-base-target' => '_next',
'title' => sprintf(