0

I am new to using yii framework. I do not have much time to learn it thoroughly. I have found one html5 web application template for yii named hebo. But i am not able to make it work by copying that template into yii folder.

Please anyone instruct me with the steps to integrate any external (not created using yiic) html templates into yii.

Cœur
  • 37,241
  • 25
  • 195
  • 267
user2086520
  • 15
  • 1
  • 6

1 Answers1

1
  • Create a new yii project

  • Copy the hebo folder into webroot/themes and in your configuration file you have to set the param theme to hebo

here is an example from one of my project:

return array(
   'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'myProject',
    'theme' => 'version_3',//so in webroot/themes I have a folder named "version_3"
    'language' => 'fr',
  • Then you'll have to put your view in the theme folder ( WebRoot/themes/hebo/views)
darkheir
  • 8,844
  • 6
  • 45
  • 66
  • Thanks a lot for your response. As u suggested, i copied hebo folder into newly created project's Ex. demo1/themes folder. In that folder there was already a folder name 'classic'. Then in protected/config/main.php file i could not find any param for theme. i did not understand point 3. Please help. – user2086520 Mar 07 '13 at 06:34
  • yeah the theme `classic` is generated by Yii! for the theme param, you can add it, I updated my answer with the begining of a config from one of my project – darkheir Mar 07 '13 at 08:59
  • For the last part it's just the place where you have to put the yii view according to the theme! For example if you have a model named `User` then you will create a folder `user` and put in it your view file like `create.php`, `update.php`, `admin.php`, ... It's basic yii structure – darkheir Mar 07 '13 at 09:05
  • thanks a ton... it worked. In my main.php file there was no theme variable, i added it now and it worked. – user2086520 Mar 07 '13 at 09:24