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(
|
$item = end($toc)->item->addChild(
|
||||||
$id,
|
$id,
|
||||||
array(
|
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(
|
'url' => Url::fromPath(
|
||||||
'doc/module/view',
|
$this->module === null ? 'doc/icingaweb' : 'doc/module/' . $this->module
|
||||||
array(
|
|
||||||
'name' => $this->module
|
|
||||||
)
|
|
||||||
)->setAnchor($id)->getRelativeUrl(),
|
)->setAnchor($id)->getRelativeUrl(),
|
||||||
'title' => htmlspecialchars($header),
|
'title' => htmlspecialchars($header),
|
||||||
'priority' => $itemPriority++,
|
'priority' => $itemPriority++, // Post-increment is on purpose
|
||||||
'attribs' => $attribs
|
'attribs' => $attribs
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue