Yii Framework Forum: add tooltip to link yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

add tooltip to link yii

#1 User is offline   moholh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 03-June 16

Posted 11 May 2017 - 05:54 AM

Hello everybody I hope you are all fine.
I have this code
<?php echo CHtml::link('<img src="/atelier/wi-comptable/images/icones/reinitial.png" style="float: right;" alt="alt" />', array('datecles/admin'));?>

I want to add tooltip title please any help

Attached File(s)


0

#2 User is offline   omolchanov 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 16-May 17

Posted 16 May 2017 - 08:07 AM

Do you need a custom tooltip? Or just 'title' attribute?

If second variant, then use

echo CHtml::link('Link Text',array('controller/action',
                   'param1'=>'value1'), 
                    array('class'=>'class_name',
                          'id'=>'id_name',
                          'title' => 'title_text'                              
                          );

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users