#c # Are there more albums below this one?
<: if (my $dir = First('dirs')) { _:>
|
#c # Loop on all the albums
<: while ($dir) { _:>
|
#c # And start a new row every fourth one
<: if (!((Get($dir,'num')+2) % $CHILD_ALBUM_COLS) && Next($dir)) { _:>
<: } :>
#c # End album loop
<: $dir = Next($dir); :>
<: } :>
#c # End if albums
<: } :>
#c # Are there any images? (There might only be CHILD_ALBUMS!)
<: if (my $pic = First('pics')) { _:>
#c # Loop on the images
<: while($pic) { _:>
<: if (my $img=Image($pic,'thumb')) { _:>
<:=Get($pic,'href','image'):><:=$img:>
<: } _:>
#c <:=Get($pic,'href','image'):><:=Name($pic):>
<:=Get($pic,'href','image'):>
#c <: if (my $cap = Caption($pic)) { _:>
#c
#c
#c <:= $cap :>
#c
#c <: } _:>
|
<: if (!((Get($pic,'num')+1) % Option('columns')) && Next($pic)) { _:>
<: } :>
#c # End while images
<: $pic = Next($pic) :>
<: } :>
#c # End if images
<: } :>
|