Yii In Drupal; Problem With Css/js Files

I managed to get Yii working in drupal. So that I can use


 require_once('yii/framework/yii.php');

  $yii = Yii::createWebApplication('yii/protected/config/main.php');

  $yii->bootstrap->register();



But when I try to use a widget like:


$cntr = new CController('') ;

  $content = $cntr->widget('bootstrap.widgets.TbButtonGroup', array(

        'type'=>'primary', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'

        'buttons'=>array(

            array('label'=>'Action', 'items'=>array(

                array('label'=>'Action', 'url'=>'#'),

                array('label'=>'Another action', 'url'=>'#'),

                array('label'=>'Something else', 'url'=>'#'),

                array('label'=>'Separate link', 'url'=>'#'),

            )),

        ),

    ),true);

return $content;



Above code is in a page callback within drupal.

The html for the buttons is generated but the script/css file are not used.

The css/js files are published in the assets folder in the webroot.

I guess I need an extra step to actually include them but I thought Yii would take care of that like in a normal

yii application.

So what am I missing here?

Sorry for replying to such an old post, but I am wondering if an answer was ever found to this issue. My situation is that I have been working in Yii for the past couple of years and love the MVC, Object-oriented approach, but now work in a place that uses Drupal. I find Drupal cumbersome and not intuitive at all if you are doing anything except content management. Unfortunately, my boss wants a single user experience, so everything must be done in Drupal ā€“ even data-driven reports, Active Directory manipulation and other things that have nothing to do with content management. Thus, I am hoping to have the best of both worlds and be able to wrap my Yii functionality in the Drupal CMS.

@Fenix, how far did you get with this? In what file did you put your first code block to require Yii ā€“ is that in the index.php at the Drupal root?

Please advise.

Hi, Iā€™m also interested to know if anyone has had success creating a Yii-Drupal hybrid? Did you have any success, TMCTurnquist?