% foreach my $image (@images) { % unless ( $x++ % $width ) { % } % } % if ($extra_cells) { % for ( 1..$extra_cells ) { % } % }
<& .thumbnail_and_caption, image => $image, gallery => $gallery &> % if ( $image->has_caption ) {
<% $image->caption_as_html %>
% }
<%args> $gallery @images <%init> my $width = $App->config->gallery_columns; my $extra_cells = $width - ( @images % $width ); my $x = 1; <%def .thumbnail_and_caption> \ thumbnail_image_file ) %> border="0" class="Rudesind-thumbnail"> <%args> $gallery $image <%init> $m->flush_buffer unless $image->has_thumbnail;