CLinkColumn imageUrl

Hi all,

I am using CLinkColumn to display a LinkedIn logo in one of my grids but I would like any advice on how to show this logo conditionally only if the users LinkedIn url is in the data base. The code right now looks like this:




array( 

	'class'=>'CLinkColumn',

	'header'=> 'LinkedIn',

	'imageUrl' => XHtml::imageUrl('linkedin.jpg'),

	'labelExpression'=>'$data->user_linkedin',

        'urlExpression'=>'$data->user_linkedin',

	'htmlOptions'=>array('style'=>'text-align:center'),

   ),



This will display the image on for every entry but will only activate the link for those entries that contain the linkedin url. This works right now but I believe it would look cleaner if only the correct images were displayed.

Thanks

something like this, you may want to double check the syntax (i haven’t tried out the syntax yet):




~~~

'imageUrl' => '($data->linkedin_flag)?XHtml::imageUrl("linkedin.jpg"):false',

~~~