FancyBox

Hello,

I have implemented a fancybox(using EFancyBox extension) which displays a youtube video(integrated using Yiitube extension). The first time I click the link the fancybox displays as expected the video but after I close the fancybox and click again on the link nothing gets displayed(it seems that the youtube content disappears from the page). Here is my code:




<?php

$attributes = array(

		'lesson_title',

		'lesson_summary',

		array('name'=>'Lesson Video Link','type'=>'raw','value'=>CHtml::link($lesson->lesson_video_link,"#data", array("id"=>"inline"))),		

		'lesson_study_guide',

		'lesson_audio_file',

		array('name'=>'Lesson Quiz','value'=>$lesson->quiz->quiz_name)

);


$this->widget('zii.widgets.CDetailView', array(

		'data'=>$lesson,

		'attributes'=>$attributes,

));


?>


<div style="display:none"><div id="data"><?php $this->widget('site.common.extensions.Yiitube.Yiitube',array('v'=>$lesson->lesson_video_link,'player'=>'vimeo'))?></div></div>

<?php $this->widget('site.common.extensions.fancybox.EFancyBox', array(

        'target'=>'a#inline',

        'config'=>array(

                'scrolling'             => 'no',

                'titleShow'             => true     		

        		

        ),

        )

);

?>



Thanks

Found the solution: we have to use the html type to render the content. Solution can be found here:





<?php

$attributes = array(

		'lesson_title',

		'lesson_summary',

		array('name'=>'Lesson Video Link','type'=>'raw','value'=>CHtml::link($lesson->lesson_video_link,"#data", array("id"=>"inline"))),		

		'lesson_study_guide',

		'lesson_audio_file',

		array('name'=>'Lesson Quiz','value'=>$lesson->quiz->quiz_name)

);


$this->widget('zii.widgets.CDetailView', array(

		'data'=>$lesson,

		'attributes'=>$attributes,

));


?>


<?php $this->widget('site.common.extensions.fancybox.EFancyBox', array(

        'target'=>'a#inline',

        'config'=>array(

                'scrolling'             => 'no',

                'titleShow'             => true,        	

        		'type'=>'html',

        		'content'=> $this->widget('site.common.extensions.Yiitube.Yiitube',array('v'=>$lesson->lesson_video_link,'player'=>'vimeo'),true)

        ),

        )

);

?>