Hi,
I've tried a couple of different ways to get a text list of the albums under the description on the root album page (ie the first page of the /gallery2 installation) but neither have worked. And I have a feeling I'm missing something obvious.
I'm using the carbon theme. I've set "Blocks to show on album pages (below description)" to 'Links to album/photo peers', but that's made the album list appear on the individual album pages but not on the root album page.
I've also tried adding the following code to the album.tpl:
Quote:
<div class="gbBlock">
{if $theme.item.id == 7}
<td class="tree">
{if !empty($theme.tree[$child.id])}
<h4> {g->text text="Subalbums:"} </h4>
<ul>
{assign var="empty" value=""}
{assign var="depth" value=0}
{foreach from=$theme.tree[$child.id] item=node}
{if $node.depth > $depth}
<li><ul>
{elseif $node.depth < $depth}
{$empty|indent:$depth-$node.depth:"</ul></li>"}
{/if}
{assign var="depth" value=$node.depth}
<li>
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$node.id`"}">
{$theme.treeItems[$node.id].title|default:$theme.treeItems[$node.id].pathComponent|markup}
</a>
</li>
{/foreach}
{$empty|indent:$depth:"</ul></li>"}
</ul>
{/if}
</td>
{else}
{* Show the album blocks chosen for this theme *}
{foreach from=$theme.params.albumUpperBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}
{/if}
</div>
But that hasn't worked.
Sorry, I realise this is probably a really obvious setting but I just can't find it.
Cheers,
Tracy
Posts: 36
I've also tried:
But that doesn't seem to do anything either.
Ho hum...
Posts: 27300
Your 2nd try should work if you add the javascript:
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
This will also list the albums in a <li>
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 36
Hi,
I've tried both, but no dice for either as yet.
The second one is writing the javascript declaration when you do view source in browser, but is not displaying the actual list on the page.
is showing this
Any ideas?
Cheers,
Tracy
Posts: 36
Okay... I got your second one working. My bad. I tried it before I'd loaded the albumselect module.
That's perfect!!
Thanks again, Floridave.
Right...now to tidy up the mini-thumbs. I would prefer to have the mediaBlock stuff as an unordered list as I find them easier to style than tables, but I think this would probably send it loopy. May give it a try at some point...that should be fun!! ;)
Cheers,
Tracy
Posts: 9
Hello
I have paste that in my album.tpl
It's ok on index but if i click on file the block desapears on the second page !!
can you help me ?
Posts: 9
ok !!!
i just keep that in table :
Its ok