Make image field also link to filemanager?
Permalink Browser Info Environment
Hi
Is there any way to make the image field link to the filemanager, I can see that it links to the sitemap and a url but I think it would be useful if it also linked to the filemanager. I am working on a site that has PDF brochure downloads and the client wants small images of the brochure covers that download the PDFs when clicked.
Regards
Karl
Is there any way to make the image field link to the filemanager, I can see that it links to the sitemap and a url but I think it would be useful if it also linked to the filemanager. I am working on a site that has PDF brochure downloads and the client wants small images of the brochure covers that download the PDFs when clicked.
Regards
Karl
Type: | Discussion |
---|---|
Status: | New |
Worked a treat thanks.
Here is the code if anybody wants to use it as a 'guide' (obviously don't just use it as it stands as some of the items will be different) but it shows the structure.
Here is the code if anybody wants to use it as a 'guide' (obviously don't just use it as it stands as some of the items will be different) but it shows the structure.
<?php if (!empty($field_2_image)): ?> <div id="downloadsimg"> <a href="<?php echo View::url('/download_file', $field_4_file_fID, Page::getCurrentPage()->getCollectionID()); ?>" class="file-<?php echo $field_4_file->getExtension(); ?>"> <img src="<?php echo $field_2_image->src; ?>" width="<?php echo $field_2_image->width; ?>" height="<?php echo $field_2_image->height; ?>" alt="" /></a> </div>
Are you a php programmer at all? If so, this should be fairly easy to figure out, but if not you'll need to create the block, then ZIP the block code (it will be a folder that has the name of the "block handle" you provided when making it, inside your site's "blocks" directory) and post it here in the forum so I can make the change for you. However, please note that I am *extremely* limited on time right now, so I am happy to help out with this but cannot guarantee any kind of timely response (sorry about this).
If time is a factor and I can't respond soon, you might want to try asking the question in the general C5 forums, pointing them to this post I have here so they know what we're talking about.
-Jordan