In MODx EVO do I have a template variable [*image*].
Related to that I have two buttons:
1) DOWNLOAD
2) PREVIEW
--- When a user clicks DOWNLOAD then a save-as or open box pops up (through content disposition attachment for which I wrote code in my .htaccess file):
<div class="box download-box"><a class="button" href="[*image*]">Download</a>
--- When a user clicks PREVIEW then the idea is that a new browser tab opens which shows the complete image in its original size:
<h2 class="thumb-caption"><span data-href="[*image*]" target="_blank">PREVIEW</span></h2>
Now both buttons trigger the download...
How do I get the user to see the full image when he/she clicks PREVIEW, and can download the image when he/she clicks DOWNLOAD, thus the two separate things for the same TV [*image*]?
I recently found out about PHx and the IF-THEN rule which is pretty cool... :p
Would that work for my problem here also? How?