Compare commits

...

2 Commits

2 changed files with 4 additions and 3 deletions

View File

@ -64,7 +64,6 @@ final class MainController extends AbstractController
foreach ($finder as $file) {
$current = &$tree;
// Dunno why it is undefined, it works
foreach (explode('/', $file->getRelativePath()) as $part) {
if ($part === '') break;
@ -74,7 +73,9 @@ final class MainController extends AbstractController
$current = &$current[$part];
}
$current[$file->getFilenameWithoutExtension()] = [];
if (!isset($current[$part])) {
$current[$file->getFilenameWithoutExtension()] = [];
}
}
return $this->render('main/index.html.twig', [

View File

@ -11,7 +11,7 @@
}) }}">
{{ name }}
</a>
{{ _self.render_tree(subtree, name ~ '/') }}
{{ _self.render_tree(subtree, prefix ~ name ~ '/') }}
</li>
{% endfor %}
</ul>