Yii won't work with custom main layout

Application generated by crud.


in config/main.php

On main page

But App uses layout from protected folder. What’s wrong? I use last Yii exported from SVN.

Looks like a bug. Please report: http://code.google.com/p/yii/issues/list


I found what is the problem.

CRUD generates in /protected/components/controller.php a string with hardcode path to


public $layout=‘application.views.layouts.column1’;

if change this to

public $layout=‘column1’;

an app works as expected.

I wrote in the bug-tracker too.

The layouts/column1.php file needs to be altered also because it lists ‘application.view.layouts.main’ as its beginContent parameter.

I’m not sure what the corrected parameter to pass in should be though?

The latest updates to Yii are a total pain. Before we could specify the preferred layout file in the default controller. Now we must go hunting around for these $layout definitions all over the place :blink:

This is definitely a huge step backwards. There are also new changes that introduce javascript (which is likely to break your own) for their pretty little functionality that just MAYBE most people won’t want, eg. the new Zii Ajax list view widget (which doesn’t even work!).

There goes another day’s work as I begin again my latest application in an older version.

Listen developers!!!! WE DO NOT WANT FEATURE CREEP LIKE WE ARE SEEING!!!!! build a solid core and let US DEVELOPERS decide anything above basic view rendering.