1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/3.0/modules/albumtree/views/albumtree_block_list.html.php
Matt Blythe d9084d5b4d fixing these so that they play nicely with galleries not rooted at /
also modifying code to be more concise...using recursion instead of the ugly stack stuff
2011-04-29 00:08:05 -06:00

31 lines
709 B
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<style type="text/css">
ul.treealbumnav {
height: 225px;
width: 190px;
overflow: auto;
border: 1px solid #666;
padding: 2px;
}
</style>
<ul class="treealbumnav">
<?
function makelist($album,$level){
//print out the list item
?>
<li>
<a href="<?= item::root()->url() ?><?= $album->relative_url_cache ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= $album->title ?></a>
</li>
<?
//recurse over the children, and print their list items as well
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
makelist($child,$level+1);
}
}
makelist($root,0);
?>
</ul>