0

On my site I have panel control and some content. Site is build on Yii framework.

panel menu:

<?php
$this->breadcrumbs=array(
    'Muzyka media'=>array('admin'),
    'Lista',
);
$this->renderPartial('_submenu',array('model'=>$model));
?>

and content:

<?php 
  $this->widget('bootstrap.widgets.TbGridView',array(
    'id'=>'muzyka-media-grid',
    'type'=>'stripped bordered condensed',
    'dataProvider'=>$model->search(),
    'filter'=>$model,
    'columns'=>array(
        'name',
        array(
            'name'=>'mime_type',
            'value'=>array($this,'displayMediaContent'),
            'type'=>'raw',
            'htmlOptions'=>array('class'=>'span3'),
            'filter'=>CHtml::listData(MuzykaMedia::model()->findAll(),'mime_type','mime_type'),
        ),
        'file_extension',
        array(
            'name'=>'file_size',
            'filter'=>false
        ),
        'count_views',
        array(
            'class'=>'bootstrap.widgets.TbButtonColumn',
        ),
    ),
  )); 
?>

Both parts work separately but for some reason I can't see, when put one after another the sub-menu doesn't render.

Joe Miller
  • 3,843
  • 1
  • 23
  • 38
Qriyo
  • 43
  • 6

1 Answers1

0

Your code is definitely Yii1.1. If you're rendering partial views from inside another view, as you seem to be doing here, then you need to echo the result, so your code should look like this;

<?php
$this->breadcrumbs=array(
    'Muzyka media'=>array('admin'),
    'Lista',
);
echo $this->renderPartial('_submenu',array('model'=>$model));
?>
Joe Miller
  • 3,843
  • 1
  • 23
  • 38