Reolbox
(Roel Vaneyghen)
December 6, 2011, 12:08pm
1
"Hello World!"
Problem
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:
<?php
$this->widget('application.extensions.fancybox.EFancyBox', array(
'target'=>'a[rel=example_group]',
'config'=>array(
'autoDimensions'=>false,
'width'=>'920',
'height'=>'auto',
'scrolling'=>'yes',
),
)
);
?>
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
)); ?>
_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.
juanandres
(Juan Andres Cabrera)
April 13, 2012, 2:40am
2
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…
joepages
(Joepages)
November 14, 2013, 2:44pm
4
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:
<?php
$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?