Yii Framework Forum: Need help and correction about my work. using Theme - Yii Framework Forum

Jump to content

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

Need help and correction about my work. using Theme Rate Topic: -----

#1 User is offline   Dan Din Dun 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 09-February 10

Posted 15 March 2010 - 02:35 AM

Hi. I want to use theming in my Yii application:

here is the information about my directory structure:
framework (yii core)
myapp/
  protected/ (yii application)
  themes/
  css/
  assets/



I have changed in myapp/protected/config/main.php in line components and adding themeManager like this:
                'themeManager' => array(
                    'basePath' => 'themes' . DIRECTORY_SEPARATOR,
                    'baseUrl'  => 'themes' . DIRECTORY_SEPARATOR,                  
                ),


I don't know is it correct definition or not. please tell me if I wrong in define the themeManager configuration. I want using theme directory in:
myapp/themes


also. when I try to debug using var_dump function in my controller, like this:

        Yii::app()->setTheme('classic');
        echo '<pre>';
        print_r(Yii::app()->getTheme());
        exit;


it produce the output like this:
Fatal error: Call to a member function getTheme() on a non-object in /mnt/win_d/www/website/latihan/yii/framework/web/CWebApplication.php on line 233


how to sett theming correctly sir. I have read the cookbook about theming but still miss and don't understand... maybe I need the sample from other tutorials. please help me.

thank you so much..

DinDun
Thanks and Kind Regards
------
DanDinDun
0

#2 User is offline   jayrulez 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 348
  • Joined: 29-July 09

Posted 15 March 2010 - 03:05 AM

i think this is insightful http://www.yiiframew.../topics.theming
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";

python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]

ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}


You say Tomato, I say Tomato.
0

#3 User is offline   Dan Din Dun 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 09-February 10

Posted 15 March 2010 - 03:42 AM

View Postjayrulez, on 15 March 2010 - 03:05 AM, said:

i think this is insightful http://www.yiiframew.../topics.theming


Ok jayrulez, thanks for your reply :-)
Thanks and Kind Regards
------
DanDinDun
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