Render nothing?

Hi again.

I’m curious if it is provided to use the layout without rendering view?

Why? For example I want to create a dashboard consisted only of widgets, so I do not want to render anything (i do not have corresponding content), cause there is no such a model like a dashboard.

What do I have now?

admin module.

default controller is Dashboard:


class DashboardController extends Controller {

  public $layout = 'dashboard';

  public $pageTitle = 'Dashboard';

  public $defaultAction = 'index';

  public function actionIndex() {

    $this->render('/dashboard/nothing');

  }

So I needed to create a folder with empty file in it and point to render this file in my dashboard controller. It’s not the way it should be. Isn’t it?

I’ve just done a dashboard and i’m using the site/index action/view

i’d suggest that you render at least the “index” view for the widgets to take place, instead of defining an exclusive layout to get it working, like

view dashboard/index





<div id="leftbar">

    <div id="first_left">

        <?php $this->widget('firstleft'); ?>

    </div>


    <div id="second_left">

        <?php $this->widget('secondleft'); ?>

    </div>


    <div id="third_left">

        <?php $this->widget('thirdleft'); ?>

    </div>

</div>


<div id="center">

    <div id="firstcenter">

        <?php $this->widget('firstcenter'); ?>

    </div>

</div>


<div id="rightbar">

        <?php $this->widget('any other'); ?>

</div>


//...... and so



hope it helps!

regards!