我已經設法在我的測試yii安裝上創建了「Testdrive」應用程序。我認爲我已經安裝了Bootstrap。試圖在Yii中激活主題並安裝Bootstrap
更重要的是我努力激活我想使用的主題。我已經通過了所有我能找到的Yii教程,並且已經改變了'theme' => 'xxxx'
沒有成功。
我已經仔細檢查了文件/文件夾權限以消除明顯的錯誤。
的URL查看演示現場直播是http://www.pureads.co.uk/testdrive
隨意問我什麼,我會回答,盡我所能。
這是我protected/config/main.php
文件中,我有試圖在我已經坐在/testdrive/themes
但似乎並沒有被工作主題,以調用。
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'Enter Your Password Here',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
/*
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
*/
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
/*
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
*/
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
/*
array(
'class'=>'CWebLogRoute',
),
*/
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'[email protected]',
),
'theme'=>'andia-agency', // requires you to copy the theme under your themes directory
'modules'=>array(
'gii'=>array(
'generatorPaths'=>array(
'bootstrap.gii',
),
),
),
'components'=>array(
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
),
);
'themes/andia-agency'文件夾的內容是什麼?並記住安裝bootstrap,你不必重複'components'屬性 – dInGd0nG 2013-02-28 14:51:43
有一個名爲Assets的文件夾和五個叫做about,contact,index,portfolio&services的html文件。在Assets文件夾中有文件夾叫做bootstrap,css,font-awesome,ico,img,js和prettyPhoto以及一個名爲sendmail.php的文件。謝謝。 – Ross 2013-02-28 15:04:06
最近我遇到了主題頭疼的問題,發現調試XDebug幫助很大 – acorncom 2013-03-01 01:01:10