Image also clickable to open document
-
Hi there,
Is there an option to make the preview image on a PDF file also clickable to open the PDF?
Cheers!
-
Hello @jurrienspr,
Thanks for reaching out.
Luckily, CatFolders Document Gallery does support these features. Please give it a try π
If you have any further questions, please feel free to contact us.
Have a nice day!
MiaHi Mia,
Where do I find this option, or is this custom work?
I already have CatFolders DG installed and running, but my preview images of the PDF aren’t clickable.
Hi there,
Please refer to #3 bullet 6 of this doc guide:
https://wpmediafolders.com/docs/addons/document-gallery/
https://wpmediafolders.com/docs/addons/document-gallery/thumbnails/
Let me know if you need any further help.
Rgards,
Alina
Hi,
I guess I don’t get it. The bullet you’re referring to mentions click operations, but where do I set these?
I work with a theme with a page builder, I paste the shortcode in the page builder.
All works fine, thumbnails are shown. Only problem is that the thumbnails don’t open the file, only the title does.
Hello @jurrienspr,
Good morning!
Thanks for your patience and efforts.
Sadly, the plugin only supports file preview when clicking on the file title, it has not supported file preview when clicking on the thumbnail image.
However, we can provide a custom code to achieve it.
Please let us know if you would like to process.
Best regards,
Mia- This reply was modified 7 months, 3 weeks ago by mialewp.
Hello @jurrienspr,
Here is the code to achieve your goal.document.addEventListener("DOMContentLoaded", function(){ jQuery('.cf-thumbnail-image').on('click', function(){ const url = jQuery(this).closest('td').next().find('a').attr("href"); window.open(url,'_blank'); }) })
Please let us know if it works as expected.
Best regards,
MiaYes works like a charm! Thanks
Hi @jurrienspr ,
We are glad to know that this helped you.
Thank you so much for choosing CatFolders. If it’s possible, can you leave the App with a nice ratings?
https://wordpress.org/support/plugin/catfolders-document-gallery/reviews/
Your review will motivate us to develop more plugins and have awesome users like you.β π
Kind regards,
BruceHi, sorry to bother you again.
My client came back to me and the image is now only clickable on desktop, not on mobile devices. Is there another piece of code needed for that?
Cheers!
Hello @jurrienspr
Good day!
We tested it on our end but there was no issue found.
Please refer to our test here https://drive.google.com/file/d/1dwN1V7cyYv2n-Aaug_N6JPuyumgdDYK9/view?usp=sharing
Can you give us the page link? Then we can test it out.
Best regards,
MiaHi there,
Link is: http://www.xl-panel.nl/hpl-verlijmen (use brandhoudt as password)
Hi @jurrienspr ,
Please use this CSS snippet:
#cf-app table.cf-table-grid.collapsed .dtr-control{ pointer-events: auto !important ; }
Let us know if it works.
Regards,
AlinaCheers, works like a charm!
HiΒ @jurriensprΒ ,
Glad to hear that π
Please do not hesitate to reach out if you need any further help or request.
Regards,
Alina
- The topic ‘Image also clickable to open document’ is closed to new replies.