Make a separate downloadBody.tpl for 'download image' link

zachharkey
zachharkey's picture

Joined: 2005-05-21
Posts: 11
Posted: Tue, 2005-05-31 12:44

At the moment, when I am on the "singleBody.tpl" and I click on the "download image" it opens a high resolution version of the image in a blank browser window. Is it possible to open that hi-res version in a different html template alltogether? Not a blank page, but not the existing singleBody.tpl either.

Perhaps something like a downloadBody.tpl where I can have the hi-res version appear by itself, with no additional menus, links or site logos, but still be centered on the page and have a copyright notice, background color, etc.

I can figure out how to make the file downloadBody.tpl but I can't figure out how and where to call it into play when the user clicks the "download image" link.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-05-31 14:35

no, we can't change DownloadItem.. that's how the images are actually sent to the browser for display and must be binary data only.
however, you're free to change any links in a layout and point them to a view in your custom module or add a parameter that the layout will handle. for example, {g->url arg1="view=core.ShowItem" arg2="itemId=`$layout.item.id`" arg3="imageViewsIndex=`$layout.sourceImageViewIndex`"}
add arg4="downloadView=1" in the url and modify layout.inc loadSingleTemplate to check for that parameter and use a different tpl if it is found. (see hybrid/layout.inc for examples of this)