I come a little bit late but i was searching how to do about the same thing and i find a way!
I would like to know how many folder there is in each gallery
in my template, inside the loop, i call the gallery with special template:
Code: Select all
{Gallery dir=$image->filename template="nb_sub"}
so, all the loop code is:
Code: Select all
{foreach from=$images item=image}
<div class="img">
{if $image->isdir}
<a href="{$image->file|escape:'url'|replace:'%2F':'/'}"
title="{$image->titlename}">
{CGSmartImage src=$image->thumb filter_resizetofit="500,200,transparent,1"
alt=$image->titlename}
</a>
{/if}
</div>
<div class="legende">
<h3>{$image->titlename}</h3>
{$image->comment}
{Gallery dir=$image->filename template="nb_sub"}
</div>
{/foreach}
you can see that i use CGSmartImage to generate my thumbs but this not important in this case!
in the nb_sub template i just put this (french words):
Code: Select all
{if $numdirs >1}
{$numdirs} galeries
{else}
{$numdirs} galerie
{/if}
for the numbers of pictures in a subgallery i used in my template:
Code: Select all
{Gallery dir=$gallerydir|cat:"/"|cat:$image->filename template="nb_images"}
and for the nb_images template i just put:
As i said before i come a little bit late but this solution can maybe help some others...
