mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
parent
d3a9f17fc2
commit
72ab5027b5
@ -13,7 +13,7 @@ class Doc_IcingawebController extends DocController
|
|||||||
*/
|
*/
|
||||||
public function tocAction()
|
public function tocAction()
|
||||||
{
|
{
|
||||||
$this->renderToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
$this->populateToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
15
modules/doc/application/views/scripts/icingaweb/toc.phtml
Normal file
15
modules/doc/application/views/scripts/icingaweb/toc.phtml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<div class="controls">
|
||||||
|
<h1><?= $docName ?> documentation</h1>
|
||||||
|
</div>
|
||||||
|
<div class="content" data-base-target="_next">
|
||||||
|
<?php
|
||||||
|
$urlHelper = $this->getHelper('Url');
|
||||||
|
$view = $this;
|
||||||
|
?>
|
||||||
|
<?= $tocRenderer->render(function ($section) use ($urlHelper, $view) {
|
||||||
|
// Chapter name is not yet defined
|
||||||
|
$path = $urlHelper->url(array('chapterName' => 'tbd'), 'doc/icingaweb/chapter', false, false);
|
||||||
|
$url = $view->url($path)->setAnchor($section->id);
|
||||||
|
return sprintf('<li><a href="%s">%s</a></li>', $url->getAbsoluteUrl(), $section->title);
|
||||||
|
}); ?>
|
||||||
|
</div>
|
Loading…
x
Reference in New Issue
Block a user