I have a project based on the Yii Framework. I followed this guide to implement boostrap for my yii project, but I get an error:
Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.
Here's the URL http://www.getyiistrap.com/site/started
I followed everything. I did not use a composer. I just downloaded the zip file.
Here is my configuration file for reference:
<?php
// uncomment the following to determine the path alias // Yii :: setPathOfAlias ('local', 'path / to / local-folder');
// This is the main configuration of the web application. Anyone writable // Here you can configure the properties of CWebApplication. return array ('BasePath' => directory_name ( FILE ). DIRECTORY_SEPARATOR. '..', 'name' => 'My Web Application',
'preload'=>array('log'),
'aliases' => array(
'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),
),
'import'=>array(
'application.models.*',
'application.components.*',
'bootstrap.helpers.*',
),
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'password',
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array('bootstrap.gii'),
),
),
'components'=>array(
'user'=>array(
'allowAutoLogin'=>true,
),
'bootstrap' => array(
'class' => 'bootstrap.components.TbApi',
),
'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'=>require(dirname(__FILE__).'/database.php'),
'errorHandler'=>array(
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
),
'params'=>array(
'adminEmail'=>'webmaster@example.com',
),
);
I followed where to put the bootstrap files. I searched the Internet but cannot find the answer. Thanks