A
A
alex5e2014-02-06 15:32:39
Yii
alex5e, 2014-02-06 15:32:39

How to solve the problem with rendering views in tabs (TbTabs)?

When displaying two views from the user module (login and registration) in a modal window in tabs from YiiBooster (TbTabs) via renderPartial(), layouts and js scripts stop working on the site. The renderPartial() call itself is written in the layout, because The modal window should be displayed on any page on click in the navigation.

<?php
     $this->widget('bootstrap.widgets.TbTabs', array(
    'type'=>'tabs',
    'placement'=>'top',
    'tabs'=>array(
        array('label'=>Yii::t('login', 'Login'), 'content'=>Yii::app()->controller->renderPartial('//../modules/user/views/user/login', array(), false, true), 'active'=>true),
        array('label'=>Yii::t('register', 'Register'), 'content'=>$this->renderPartial('//../modules/user/views/user/registration', array(), false, true)),
    ),
));
?>

Tell me, maybe I missed something? There were topics in the search where some said that through renderPartial(layout is not transmitted), but why then do the template and scripts not work on the entire page, and not just in the tabs where I call renderPartial()?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question