Guys, kind of new of this forum. Have been developing in Yii for a couple of months, havent had much trouble.
Anyways I encountered this bug: when I use CGridView and use an expression to generate an image tag (for deleting a row) the Image or Link will not ‘listen’ to the htmlOptions array given: for example:
Just tested your code and it works on my side. The “rel” attribute appears with the id’s value set properly; and of course your code looks alright. Displaying an image you need to set type=raw but if you don’t the HTML code will be displayed as text with the “rel” attribute. If your model was lacking the id you would see another error message. Having said all this I don’t have any clue why you can’t get the “rel” attribute.
Just in case… what Yii version are you using?
And please post the entire array element where you display the image. Here’s mine: