Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I have a Couch cms:editable hyperlinked image. The hyperlink is added through the CMS Admin. On clicking the image, I want to download the pdf link which has been added through Couch. Can I allow the user to download onClick?
Hi,

If the image is uploaded using cms:editable type 'image' and the link using cms:editable type 'text', it is straightforward e.g.
Code: Select all
<a href="<cms:show my_pdf />"><img src="<cms:show my_image />" /></a>

You might want to use cms:cloak_url tag (http://www.couchcms.com/docs/concepts/c ... links.html) to force the download box to open upon clicking the link.

However, if the image/link are entered using the wysiwyg 'richtext' region, there is no simple way of using values from other editable region. Perhaps you'll find using shortcodes (http://www.couchcms.com/docs/miscellane ... codes.html) helpful in that case.
2 posts Page 1 of 1
cron