I'm new to Yii and wanted to implement the Twitter Bootstrap extension, I have followed cniska but apparently I'm doing something wrong.
When I load the page in the browser with extension code, the images/effects don't load.
In my html page I got this simple toggle button found here.
<?php $this->widget('bootstrap.widgets.TbButton', array(
'buttonType'=>'button',
'type'=>'primary',
'label'=>'Toggle me',
'toggle'=>true,
)); ?>
The result with this is as if I have just done a simple HTML button with no classes applied to it, a 'bare' sytle button, so do speak.
My config/main.php:
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'Test App',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'<password>',
'ipFilters'=>array('127.0.0.1','::1'),
),
),
'components'=>array(
'user'=>array(
'allowAutoLogin'=>true,
),
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
'theme'=>'bootstrap', -// requires you to copy the theme under your themes directory
'modules'=>array(
'gii'=>array(
'generatorPaths'=>array(
'bootstrap.gii',
),
),
),
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=<bdname>',
'emulatePrepare' => true,
'username' => '<bd username>',
'password' => '<bd password>',
'charset' => 'utf8',
),
'errorHandler'=>array(
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'webmaster@example.com',
),
);
I also believe I have the latest versions as I downloaded Yii's framework this week as well as the extension. Any tips?
Thanks in advance