foto: translate tag album requests to .tag
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 27 Apr 2021 15:03:15 +0000 (17:03 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 27 Apr 2021 16:39:27 +0000 (18:39 +0200)
Hidden from overviews but accessible without dot.

foto/index.php

index 8ba7db1768b977d9f75c2eb36dc6852776526f2f..1ebb53986bc08c3046e94ca32a1b5b60d137ef64 100644 (file)
@@ -2,6 +2,9 @@
 $rootdir = $Page->link;
 
 $nav = explode('/', $rootdir);
+if (count($nav) > 1 and $nav[1] == 'tag') {
+       $rootdir = preg_replace('{/}', '/.', $rootdir, 1);
+}
 $nav[0] = "Foto's"; # override of root 'foto'
 $title = array_pop($nav);
 $Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title;