parent
d3a9f17fc2
commit
72ab5027b5
|
@ -13,7 +13,7 @@ class Doc_IcingawebController extends DocController
|
|||
*/
|
||||
public function tocAction()
|
||||
{
|
||||
$this->renderToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
||||
$this->populateToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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…
Reference in New Issue