Yii Framework Forum: Yii won't work with custom main layout - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii won't work with custom main layout Rate Topic: -----

#1 User is offline   dreammaker 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 02-July 09

Posted 19 March 2010 - 02:06 PM

Application generated by crud.

'theme'=>'classic',


in config/main.php

On main page

Quote

Layout file: /home/www/sites/mysite/public_html/themes/classic/views/layouts/main.php


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

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,780
  • Joined: 17-January 09
  • Location:Russia

Posted 19 March 2010 - 03:43 PM

Looks like a bug. Please report: http://code.google.c...yii/issues/list
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   dreammaker 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 02-July 09

Posted 19 March 2010 - 04:01 PM

http://code.google.c.../detail?id=1043
0

#4 User is offline   dreammaker 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 02-July 09

Posted 19 March 2010 - 06:13 PM

I found what is the problem.

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

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.
0

#5 User is offline   Dana 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 203
  • Joined: 18-February 10
  • Location:Florida, USA

Posted 25 March 2010 - 12:33 PM

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?
0

#6 User is offline   Backslider 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 363
  • Joined: 23-July 09

Posted 26 March 2010 - 04:45 PM

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.
We were all once expert at....... nothing.

yii-language-behavior

My Blog
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users