modules/doc: Fix toc links
The DocParser generates toc links with a hard-coded URL. This should be changed to be generated from a route. But we did not decide how to handle route overrides yet. refs #4820
This commit is contained in:
parent
1d5c4c5055
commit
5923622fb8
|
@ -104,14 +104,13 @@ class DocParser
|
|||
$item = end($toc)->item->addChild(
|
||||
$id,
|
||||
array(
|
||||
// TODO(el): URL should be generated from a route else we always have to adapt the
|
||||
// URL here when we change URLs
|
||||
'url' => Url::fromPath(
|
||||
'doc/module/view',
|
||||
array(
|
||||
'name' => $this->module
|
||||
)
|
||||
$this->module === null ? 'doc/icingaweb' : 'doc/module/' . $this->module
|
||||
)->setAnchor($id)->getRelativeUrl(),
|
||||
'title' => htmlspecialchars($header),
|
||||
'priority' => $itemPriority++,
|
||||
'priority' => $itemPriority++, // Post-increment is on purpose
|
||||
'attribs' => $attribs
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue