From 7824793afe4c2e92d2a543a99efa20620d752113 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Tue, 11 Jan 2022 20:06:10 +0100 Subject: [PATCH] Add Directory Breadcrumbs --- index.php | 10 ++++++++-- tpl/gallery.html | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 36e4a3a..da67c5d 100644 --- a/index.php +++ b/index.php @@ -117,8 +117,14 @@ if (!empty($curfiles)| !empty($dirs)) { $data['images'][] = $tmp; } } - } - + if (!empty($dirs)) { + $tmppath = ''; + foreach($dirs as $tmpdir) { + $tmppath=$tmppath.DIRECTORY_SEPARATOR.$tmpdir; + $data['crumbs'][$tmpdir] = $tmppath; + } + } + } Template::view('tpl/gallery.html', $data); } else { $data['gallery_page'] = ceil($page/$gslice); diff --git a/tpl/gallery.html b/tpl/gallery.html index 7fdae80..2bba68e 100644 --- a/tpl/gallery.html +++ b/tpl/gallery.html @@ -5,7 +5,14 @@ {% block content %}