 |

InHouse
User
Apr 24, 2008, 8:49 PM
Post #1 of 3
(179 views)
Shortcut
|
|
Selecting Specific Upload from List
|
Can't Post
|
|
In one Section Editor I have to have more than one uploaded file. One is a JPG and the other is a PDF. I've allowed the PDF type upload, JPG thumbnailing, and everything is working well. I'd like some ideas of how I can manage the output better than I am currently. I'm showing a thumbnail of the JPG (no problem) and then want to also have a link to the PDF for immediate download. Right now the PDF download link looks like:
<?php if ($upload['isImage'] = FALSE ): ?> <a href="<?php echo $upload['urlPath'] ?>">Download PDF</a> But $upload['urlPath']is returning the URL for the first upload in the list. In this case it's the JPG. I'd like to sniff for a .PDF file type ideally. Is that possible? Jayme
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 24, 2008, 9:06 PM
Post #2 of 3
(178 views)
Shortcut
|
|
Re: [InHouse] Selecting Specific Upload from List
[In reply to]
|
Can't Post
|
|
No problem. We can make it work just about any way you could imagine with just a little bit of code. Try this:
<?php if (!$upload['isImage']): ?> <a href="<?php echo $upload['urlPath'] ?>">Download PDF</a> ... The ! means "not" as in "not image". Let me know if that does the trick or if you need something more. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

InHouse
User
Apr 24, 2008, 9:27 PM
Post #3 of 3
(176 views)
Shortcut
|
|
Re: [Dave] Selecting Specific Upload from List
[In reply to]
|
Can't Post
|
|
Hi Dave, Yeah, I tried that but it didn't work as expected. I probably should have mentioned that this is being done in conjunction with the photo gallery code mentioned in: http://www.interactivetools.com/forum/gforum.cgi?post=59842#59842 I'll PM you the files as they now include a series of ... well... includes. J.
|
|
|  |
|