Hi!
So I’m trying to figure out whether it’s possible to target the image in a custom button with a specific id?
First take a look at this extract of the code:
$this->widget('zii.widgets.grid.CGridView', array(
...
array(
'class' => 'CButtonColumn',
'header' => 'test',
'template'=>'{button-1} {button-2}',
'buttons' => array(
'button-1' => array(
'label' =>'description...',
'imageUrl' =>'/url/to/image.png',
'url' =>'',
),
...
),
...
);
When I put options for button-1 using
...
'options' => array('id' => 'identifier-name'),
...
yii attaches the id on the link element <a> when being rendered.
So, now to my question, is it possible to attach an id to the <img /> element rendered from the ‘imageUrl’ attribute?
Grateful for any answers or work arounds to getting this working!