Hide directories that have no content

This commit is contained in:
Stéphane Goetz
2015-07-29 08:30:41 +02:00
parent 114a0f29b7
commit 386f323dd0
2 changed files with 25 additions and 0 deletions

View File

@ -108,6 +108,10 @@ class Template
'class' => ($current_url === $link) ? 'active' : ''
];
} elseif ($node instanceof Directory) {
if (!$node->hasContent()) {
continue;
}
$link = ($path === '') ? $url : $path . '/' . $url;
$folder = [