Question

I am working on framework yii ,I am using 2-column layout , all content from view are shown in the right column.

I want to show some widgets from view in the left column under menu. how can do it ?

No correct solution

OTHER TIPS

Put in the widgets in the layout. Your view does not stand alone on a page, it usually stays in a layout. In the view (well not really but for the sake of the argument) I do

<?php
    $this->breadcrumbs = array(
        array('name' => 'Home', 'url' => array('/')),
        array('name' => ($this->model->isNewRecord ? 'Create ' : 'Update ') . 'Contact',
    );
?>

I can then do in the layout

<?php $this->widget('MyBreadCrumbs', array(
  'crumbs' => $this->breadcrumbs,
)); ?> 

Read more about the rendering process here: http://www.yiiframework.com/wiki/249/understanding-the-view-rendering-flow/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top