obsidian-web/templates/menu.php

42 lines
964 B
PHP
Raw Normal View History

<?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>