difference between gallery thumb and photo thumb

artikboy

Joined: 2006-02-07
Posts: 2
Posted: Tue, 2006-02-07 14:42

Hi

I'm new to Gallery although I work with PHP frequently. I've come across a problem while customizing gallery for a client's page.
The thing is, I wanted the photos fullview to open in a popup and so I've change the link around the thumbnail into this

Quote:
{elseif isset($child.thumbnail)}
<a href="javascript:;" onclick="window.open('{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}','','width=800,height=800,resizable=1,scrollbars=1');">
{g->image item=$child image=$child.thumbnail class="giThumbnail"}
</a>

But now, everytime I click a thumbnail, whether it is from a photo or from an album, it opens up a popup.
My question is, does anyone know a way that I can distinguish an album thumb from a photo thumb in order to define two separate actions?

Thank you

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2254
Posted: Tue, 2006-02-07 18:13

{if !$child.canContainChildren}
stuff for only album items here
{/if}

 
artikboy

Joined: 2006-02-07
Posts: 2
Posted: Wed, 2006-02-08 00:50

Thank you