PDF in Products

3 posts by 3 authors in: Forums > CMS Builder
Last Post: May 26, 2009   (RSS)

By KCMedia - May 25, 2009

Hi

Is there anyway of having the PDF icon show up on the products page, we are uploading the pdf doucment from the image upload in the product area but it puts a Download link there is there a way of having the PDF icon replace that when you upload a PDF document any where.

thanks
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] PDF in Products

By Perchpole - May 26, 2009

Hi, KC -

You need pose this as an IF statement along the lines of...

"IF the upload has a pdf extension then do xyz."

The statement can be expressed in code as follows:

<?php if ($upload['extension'] == 'pdf'): ?><img src="pdf_icon.gif" />
<?php elseif ($upload['extension'] == 'doc'): ?><img src="word_icon.gif" />
<?php elseif ($upload['extension'] == 'zip'): ?><img src="zip_icon.gif" />
<?php else: ?><img src="blank_icon.gif" />
<?php endif ?>




Hope this helps.

:0)

Perchpole