Skip to content

Commit

Permalink
DocTocRenderer: no anchor for toplevel entries
Browse files Browse the repository at this point in the history
Makes links look better and hides anchor-encoding issues at least on
top level
  • Loading branch information
Thomas-Gelf committed Nov 13, 2015
1 parent 3e93d62 commit 5324875
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/doc/library/Doc/Renderer/DocTocRenderer.php
Expand Up @@ -86,7 +86,9 @@ public function render()
);
$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(
Expand Down

0 comments on commit 5324875

Please sign in to comment.