Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm using the Lightbox trigger, trying to get it to show a pdf in lightbox when someone clicks on the node title in the view.
Works fine to trigger a light box from the title, but in the lightbox it just displays the pdf icon of the file, not the pdf contents. I've tried changing the format of the field_pdf from 'generic files' to everything else, but it still doesn't work.
Any ideas? The view export is attached.
Comment | File | Size | Author |
---|---|---|---|
export.txt | 8.58 KB | jglynn |
Comments
Comment #1
jglynn CreditAttribution: jglynn commentedSeems like the problem is that it creates a lightmodal link, not a lightframe link as it should be for a pdf.
I got around this by not using lightbox trigger, instead I just rewrote the output of the title field as
<a rel='lightframe[]' href='[field_article_pdf_fid]'>[title]</a>
I was surprised to see I could rewrite the output as a link, but it works.
However, it won't let me add in width and height parameters to the link, must have something to do with the parsing of the output.
Comment #2
pabben CreditAttribution: pabben commentedI was having this same issue but with an image, the solution was that the image was set as Generic File. After change the type in the view to Image the problem is gone.