EllisLab text mark
Advanced Search
     
Mmm, Helper HTML Problem with alt tag?
Posted: 05 May 2009 04:15 AM   [ Ignore ]
Avatar
Joined: 2009-02-15
14 posts

Hello!

I have a little problem with img() function of HTML_HELPER.

for example:

img($row->image, $row->title);

$row->title is the alt tag of image; but… the output is:

http://domain.com/images.png

without alt flag!
Where is the problem? Internal bug of CI?

 Signature 

“because change happens…”

 
Posted: 05 May 2009 05:00 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-04-19
1152 posts

the prototype is

img('images/picture.jpg'); 

or if you want to have ‘alt’, use:

$image_properties = array(
          
'src' => 'images/picture.jpg',
          
'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time',
          
'class' => 'post_images',
          
'width' => '200',
          
'height' => '200',
          
'title' => 'That was quite a night',
          
'rel' => 'lightbox',
);

img($image_properties); 

with the alt property being, ‘Me, demonstrating how to eat 4 slices of pizza at one time’.

 Signature 

PinoyTech - Web Development Blog