Version yii-bootstrap-2.0.1.r324.zip problems.
I download the yii-bootstrap-2.0.1.r324.zip and follow the setup guide http://www.cniska.net/yii-bootstrap/setup.html#setup step by step. but the bootstrap css & js not auto register after run :
main.php
<?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.
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
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,
),
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
// 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'=>'webmaster@example.com',
),
);
but, the widget code is right, any help?
full html source code after run:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<!-- blueprint CSS framework -->
<link rel="stylesheet" type="text/css" href="/css/screen.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="/css/ie.css" media="screen, projection" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" type="text/css" href="/css/form.css" />
<script type="text/javascript" src="/assets/7930ee21/jquery.js"></script>
<title>My Web Application</title>
</head>
<body>
<div class="container" id="page">
<div id="header">
<div id="logo">My Web Application</div>
</div><!-- header -->
<div id="mainmenu">
<ul id="yw1">
<li class="active"><a href="/index.php?r=site/index">Home</a></li>
<li><a href="/index.php?r=site/page&view=about">About</a></li>
<li><a href="/index.php?r=site/contact">Contact</a></li>
<li><a href="/index.php?r=site/logout">Logout (demo)</a></li>
</ul> </div><!-- mainmenu -->
<!-- breadcrumbs -->
<div id="content">
<div class="navbar navbar-fixed-top"><div class="navbar-inner"><div class="container-fluid"><a class="btn btn-navbar" data-toggle="collapse" data-target="#yii_bootstrap_collapse_0"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a href="/site/index" class="brand"><img src="/images/logo.png" width="30" height="30"/></a><div class="nav-collapse" id="yii_bootstrap_collapse_0"><ul id="yw0" class="nav"><li class="active"><a href="/index.php?r=site/index"><i class="icon-home"></i> 首页</a></li></ul></div></div></div></div><h1>Welcome to <i>My Web Application</i></h1>
<p>Congratulations! You have successfully created your Yii application.</p>
<p>You may change the content of this page by modifying the following two files:</p>
<ul>
<li>View file: <code>D:\Cloud\Skydrive\www\projects\blog\protected\views\site\index.php</code></li>
<li>Layout file: <code>D:\Cloud\Skydrive\www\projects\blog\protected\views\layouts\main.php</code></li>
</ul>
<p>For more details on how to further develop this application, please read
the <a href="http://www.yiiframework.com/doc/">documentation</a>.
Feel free to ask in the <a href="http://www.yiiframework.com/forum/">forum</a>,
should you have any questions.</p>
</div><!-- content -->
<div class="clear"></div>
<div id="footer">
Copyright © 2012 by My Company.<br/>
All Rights Reserved.<br/>
Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a>. </div><!-- footer -->
</div><!-- page -->
<script type="text/javascript">
/*<![CDATA[*/
jQuery(function($) {
jQuery('#yii_bootstrap_collapse_0').collapse({'parent':false,'toggle':false});
});
/*]]>*/
</script>
</body>
</html>
thks!