Add Directory Breadcrumbs

This commit is contained in:
seiichiro 2022-01-11 20:08:58 +01:00
parent 7824793afe
commit 4da80cbc22
2 changed files with 4 additions and 4 deletions

View file

@ -117,9 +117,9 @@ if (!empty($curfiles)| !empty($dirs)) {
$data['images'][] = $tmp;
}
}
if (!empty($dirs)) {
if (!empty($d)) {
$tmppath = '';
foreach($dirs as $tmpdir) {
foreach($d as $tmpdir) {
$tmppath=$tmppath.DIRECTORY_SEPARATOR.$tmpdir;
$data['crumbs'][$tmpdir] = $tmppath;
}

View file

@ -8,14 +8,14 @@
<div class="title">
<a href="{{ $startpage }}">{{ $galleryname }}</a>
{% if (!empty($crumbs)): %}
{% foreach ($crumbs as $name => $path): %}
{% foreach($crumbs as $name => $path): %}
<p> / </p><a href="index.php?d={{ $path }}&s={{ $slice }}&p=1">{{ $name }}</a>
{% endforeach %}
{% endif %}
</div>
<div class="search">
<form action="index.php" method="get">
<input type="text"placeholder="Suche.." name="f" />
<input type="text" placeholder="Suche.." name="f" />
<button type="submit"><i class="fa fa-search"></i></button>
<input type="hidden" name="d" value="{{ $dir }}">
<input type="hidden" name="s" value="{{ $slice }}">