Hello,
I need help
I want to and output like this
<a href="abc.php"><img src="abc.jpg" /></a>
I tried like this
$login = Yii::app()->request->baseUrl."/css/images/site/login.png";
$this->widget('zii.widgets.CMenu', array(
'items' => array(
array('label' => "<img src='$login' alt=''>",
'itemOptions' => array('class' => 'hdr_link'),
'url' => array('/user/login'), 'visible' => Yii::app()->user->isGuest),
),
));
but it dont gives me correct output
Please help me out.
Thanks in Advance.
Page 1 of 1
Image Inside Anchor Tag Image inside anchor tag in Cmenu
#2
Posted 07 December 2012 - 03:33 PM
this should do it
$login = Yii::app()->request->baseUrl."/css/images/site/login.png";
$this->widget('zii.widgets.CMenu', array(
'items' => array(
array('label' => CHtml::image($login),
'itemOptions' => array('class' => 'hdr_link'),
'url' => array('/user/login'), 'visible' => Yii::app()->user->isGuest),
),
));
Share this topic:
Page 1 of 1

Help














