Not sure if this is the right forum for this question.
I have a G2 site using the Matrix template and currently containing a significant number of photos. I want to be able to set up an album which can contain e.g: PDF files. In these cases clicking the thumbnail first presents a large version of ImageMagick's thumb. To download, the user must then (identify) and click "Download document in original format".
I would like the initial click to result in immediate download - but only in the case of non-image files. A quick surf around the forum indicates that a mod to album.tpl is needed, but how can you identify whether the file is PDF or something else?
Very grateful for any help.
Posts: 8339
{if $child.mimeType == 'application/pdf'} {capture assign=linkUrl}{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}{/capture} {else} {capture assign=linkUrl}{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}{/capture} {/if}-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 4
Thanx Suprsidr - works a treat!