Yii Framework Forum: Fancybox Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fancybox Extension fancybox not working for a view with model Rate Topic: -----

#1 User is offline   richard125 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 16-August 12

Posted 16 August 2012 - 01:10 AM

fancybox not working for view with model

view:
<?php echo CHtml::link("jelentem",array('/fancybox/carbo'),'model'=>$model,array('id'=>'iframe'))?>

<?php $this->widget('ext.fancybox.EFancyBox', array(
'target'=>'a#iframe',
'config'=>array(
'scrolling'=>'no',

'titleShow'=>true),
)
);
?>

controller:

public function actionCarbo()
{
$this->layout = false;

$this->render("/apple/index", 'model'=>$model);
}
0

#2 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 668
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 16 August 2012 - 01:26 AM

hi richard you can not pass model to CHtml::link just a quick question why do you need to pass the model to the link

<?php echo CHtml::link("jelentem",array('/fancybox/carbo'),'model'=>$model,array('id'=>'iframe'))?>
0

#3 User is offline   richard125 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 16-August 12

Posted 16 August 2012 - 02:44 AM

i am using fancybox in my application in that while i am rendering a view without model of another controller in fancybox is working nicely but when i am using a view with model of another controller calling to render in fancybox is throwing the error ...the requested content cannot be display...where is problem ..plz suggest me some idea...i tried all the possiblties...but is not working
0

#4 User is offline   joepages 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 12-November 13

Posted 14 November 2013 - 09:38 AM

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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users