alt image title

4 posts by 3 authors in: Forums > CMS Builder
Last Post: May 30, 2011   (RSS)

By TheSeen - May 30, 2011

Is it possible to create an alt image description when you upload an image via CMS?

many thanks

Re: [TheSeen] alt image title

By robin - May 30, 2011

Hey, you can use the titile or caption fields as your alt text. You just need to make a small addition to your image viewer code. For example if you want to use 'title' as your alt text, add this code to the empty alt attribute:
alt="<?php echo $upload['info1'] ?>"
So a thumbnail line would look this this:
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="<?php echo $upload['info1'] ?>" /><br/>

info1 is the title. If you wanted to use caption, then use info2

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] alt image title

By TheSeen - May 30, 2011

Perfect, thanks.