Page 1 of 1

Text gallery tree

Posted: Thu Mar 21, 2013 10:38 am
by aldomoro
How to display full simple text gallery tree (like sitemap, all levels) using galery and subgallery titles (not directory names)?
Can anybody help me, pls? Thank you!

Re: Text gallery tree

Posted: Thu Mar 21, 2013 11:28 am
by klenkes
I use this template to do just that:

Code: Select all

<ul>
{assign var='g_prevdepth' value=1}
{foreach from=$images item=image name=img}

{if $image->depth > $g_prevdepth}
{repeat string="<ul>" times=$image->depth-$g_prevdepth}
{elseif $image->depth < $g_prevdepth}
{repeat string="</li></ul>" times=$g_prevdepth-$image->depth}
</li>
{elseif $smarty.foreach.img.index > 0}</li>
{/if}
<li><a href="{$image->file}" title="{$image->titlename}">{$image->titlename}</a>

{assign var='g_prevdepth' value=$image->depth}
{/foreach}
{repeat string="</li></ul>" times=$image->depth-1}</li>
</ul>

Re: Text gallery tree

Posted: Thu Mar 21, 2013 11:58 am
by aldomoro
Thank you, it works but only in basic level... :-(
http://www.linharti.cz/galerie

Re: Text gallery tree

Posted: Sat Mar 23, 2013 11:14 am
by klenkes
aldomoro wrote:Thank you, it works but only in basic level... :-(
http://www.linharti.cz/galerie
On my Testsite it shows the full hierarchy.
I call the gallerytree with the root gallery, like that:

Code: Select all

{Gallery dir='vehicles' action="gallerytree"}
Where "vehicles" is in gallery root, parallel to Gallery.

Aside from that, you have a lot of nested <strong> outside of any <li> Tag.

Re: Text gallery tree

Posted: Tue Mar 26, 2013 2:49 pm
by aldomoro
klenkes wrote: I call the gallerytree with the root gallery, like that:

Code: Select all

{Gallery dir='vehicles' action="gallerytree"}
This shows hierarchy, but with active thumbnails. I need to show only text hierarchy (like simple menu).