2014-06-06 14:12:32 +02:00

26 lines
823 B
PHTML

<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 ($node) use ($urlHelper, $view, $moduleName) {
$section = $node->getValue();
$path = $urlHelper->url(
array('moduleName' => $moduleName, 'chapterName' => $section->chapterName), 'doc/module/chapter', false, false
);
$url = $view->url($path);
if ($section->id) {
$url->setAnchor($section->id);
}
return sprintf(
'<li><a %shref="%s">%s</a></li>',
$section->nofollow ? 'rel="nofollow" ' : '',
$url->getAbsoluteUrl(),
$section->title
);
}); ?>
</div>