Getting the absolute image source within a theme

picturelizard
picturelizard's picture

Joined: 2006-05-11
Posts: 7
Posted: Wed, 2007-03-21 15:23

I'm modifying \themes\...\templates\photo.tpl to support our photo
printing API

I need to determine within photo.tpl the actual path of the full resolution image displayed on this page eg:

<a href="print4me.php?image_url=\g2_data\albums\gallery1\myimage.jpg"> add to cart </a>

where the variable image_url=\g2_data\... is the image path generated by a call within the smarty templates.

Can anyone help?

The closest I've seen, is to use:

{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"
arg3="imageViewsIndex=`$smarty.section.imageView.index`"}

but this gives a URL to the full resolution, is there code that will give the local path to a galleries full resolution image?

An example of how it's being used can be found at :

http://www.picturelizard.co.uk/community.php?g2_itemId=139

Many Many Thanks,

Mark Townsend

www.picturelizard.co.uk
photos | frames | albums | gifts