1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
use yii\apidoc\templates\bootstrap\SideNavWidget;
/**
* @var yii\web\View $this
* @var string $content
*/
$this->beginContent('@yii/apidoc/templates/bootstrap/layouts/main.php'); ?>
<div class="row">
<div class="col-md-2">
<?php
asort($headlines);
$nav = [];
foreach ($headlines as $file => $headline) {
if (basename($file) == 'README.md') {
$nav[] = [
'label' => $headline,
'url' => $this->context->generateGuideUrl($file),
'active' => isset($currentFile) && ($file == $currentFile),
];
unset($headlines[$file]);
}
}
foreach ($headlines as $file => $headline) {
$nav[] = [
'label' => $headline,
'url' => $this->context->generateGuideUrl($file),
'active' => isset($currentFile) && ($file == $currentFile),
];
} ?>
<?= SideNavWidget::widget([
'id' => 'navigation',
'items' => $nav,
'view' => $this,
]) ?>
</div>
<div class="col-md-9 guide-content" role="main">
<?= $content ?>
</div>
</div>
<?php $this->endContent(); ?>