<?
//creamos un link
echo CHtml::link('link',"#data", array("id"=>"fancy-link"));
echo CHtml::link(CHtml::image(Yii::app()->theme->baseurl.'/images/red.png'),"#data", array("id"=>"fancy-link", "class"=>"imgl"));
//put fancybox on page
$this->widget('application.extensions.fancybox.EFancyBox', array(
'target'=>'a#fancy-link',
'config'=>array(),));
?>
//usamos un div
<div style="display:none">
<div id="data">
<p>Probando fancybox</p>
</div>
</div>
fuente:...