Yii Framework Forum: Yiibooster Modal Renderpartial - Yii Framework Forum

Jump to content

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

Yiibooster Modal Renderpartial

#1 User is offline   Sergio_HW 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 30-December 13

Posted 13 February 2014 - 05:32 AM

I am going to explain my situation, I hope you can help me, I have 2 tables related, Inmuebles and documentación, I load the Clistview of inmuebles, and I have a button that display a modal window to see the documentacion that I did with yiibooster, but I need to show in the modal window the documentation of each inmueble specifically, not all the documentation table.

Here is some code I have used.

Modal window:

<?php $this->beginWidget(
    array('id' => 'incidencias')
); ?>
    <div class="modal-header">
        <a class="close" data-dismiss="modal">&times;</a>
        <h4>Incidencias Inmueble: &nbsp<?php echo CHtml::encode($data['inmueble_nombre']);?></h4>
        $doc = new ZfDocumentacionInmueble;
        $this->renderPartial('//ZfDocumentacionInmueble/index', array('model'=>$doc));
    <div class="modal-footer">
        <?php $this->widget(
                'label' => 'Cerrar',
                'url' => '#',
                'htmlOptions' => array('data-dismiss' => 'modal'),
        ); ?>
<?php $this->endWidget(); ?>

With that, the dataprovider is not defined, I tested:

$doc = new ZfDocumentacionInmueble;
        $docus = new CActiveDataProvider('ZfDocumentacionInmueble'); 
        $this->renderPartial('//ZfDocumentacionInmueble/index', array('model'=>$doc,'dataProvider' => $docus));

But it takes the information of the main view "inmuebles" and not from documentation, causing errors.

Thanks a lot!

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