如何更改Yii开头显示的视图?

By default, class Controller has:

public $layout='//layouts/column2';

This view should not be displayed as the first client, I need to display at site/index was loaded single-column view, but the links from this page used layouts/column2. In other words, the user sees visiting the website:

1 column

Clicks on the menu and it has a two-column displays the site:

2 column

You can change the used layout on a view basis:

function actionIndex() {
    $this->layout = '//layouts/column1';
}

function actionSomethingElse() {
    $this->layout = '//layouts/column2'; // If the default layout is column2 you can skip this line
}

Resolved!

In siteController.php

    public $layout='//layouts/column2';

In action:

    public $layout='//layouts/column1';
    $this->render('index');