fancybox + clistview

"Hello World!"


I show a list of hotels via CListView and when a user clicks on the id number a fancybox (via widget) should pop up with a detailed view of the hotel.

I managed to get this function, BUT it only works in the first page of the pagination.

index.php view file:


$this->widget('application.extensions.fancybox.EFancyBox', array(











<?php $this->widget('zii.widgets.CListView', array(



)); ?>

_view.php view file:

<div class="view">

	<b><?php echo CHtml::encode($data->getAttributeLabel('hotel_id')); ?>:</b>

	<?php echo CHtml::link(CHtml::encode($data->hotel_id), array('view', 'id'=>$data->hotel_id), array('rel'=>'example_group')); ?>

	<br />


What do I have to do to make this work?

Grrrrrrrreat thanks.

Hello there!

I Had the same issue and

I solved it using lightbox extension .

good luck…

I am facing same problem,

can you please provide link of that extension…

Hello guys, I’m trying to do something easy but I can’t find the way to do so on Yii Framework.

What I want to do, is open a fancybox frame which takes me to another create.php in another view. What I want to do is that when the user click "save" it save the information and then closes de fancybox frame that I just openned…

Here is how enable the fancybox frame:


		$config = array( );

		$this->widget('application.extensions.fancybox.EFancyBox', array( 'target'=>'#antecedentes', 'config'=>$config,));

		echo CHtml::link('Agregar Antecedentes',array('antecedentes/create?valorpasar=$id'),array('id'=>'antecedentes'));


I think there should be a way to give the instruction to the button not to releoad to other page just to close thi fancybox frame.

<?php echo CHtml::submitButton($model->isNewRecord ? 'Guardar' : 'Save'); ?>

Any ideas?