obsidian-web/templates/menu.php
Curle 1e4a739be7 Current working tree.
Has some issues to be worked out.
2020-09-14 21:22:46 +01:00

42 lines
964 B
PHP

<?php
/**
* Get the list of paths taken to get to this screen
*/
$breadcrumbs = breadcrumbs( absoluteToRelative( $imagesFolder, $config["images"] ) );
/**
* Begin encoding them into the url. Files is always the current image.
*/
$url = "?file=.";
/**
* Switch to HTML, send out some divs.
* First, set up the home link,
* then iterate over the breadcrumbs and add them.
*
* This should create something like
* Home > Albums > Cat Pictures > Cat_01.png
*
*/ ?>
<div id="breadcrumbs">
<div class="content_title">
<a href=".">Home</a>
<?php foreach ($breadcrumbs as $b) {
$url = $url."/".$b;
/**
* Given the structure of the URL at this point
* (with each breadcrumb being incrementally added)
* We can use it to create a soft link to each stage,
* should the user want to go back.
*/
echo "> <a href=\"$url\">$b</a></li>";
} ?>
</div>
</div>