Closed andrwsv closed 10 years ago
Hello andrwsv, please post more information, like the code is throwing the exception and your config/main.php file.
Regards.
Hi, tnaks for you answer jayala,
I create new site with yii and followed instructions of this site. and Downloaded the package and unzip its contents in my extensions/bootstrap folder.
return array( 'basePath'=>dirname(FILE).DIRECTORY_SEPARATOR.'..', 'name'=>'My Web Application', 'theme'=>'kongoon', 'aliases' => array( 'bootstrap' => realpath(DIR . '/../extensions/bootstrap'), // change this if necessary ), // preloading 'log' component 'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.*',
'bootstrap.*',
'bootstrap.components.*',
'bootstrap.behaviours.*',
'bootstrap.helpers.*',
'bootstrap.widgets.*',
'bootstrap.helpers.TbHtml',
),
'modules'=>array(
'bootstrap'=>array(),
'gii' => array(
'class' => 'system.gii.GiiModule',
'password'=>'1234',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array(
'bootstrap.gii'
)
in my themes/kongoon/views/main.php I put : Yii::app()->bootstrap->register();
andrwsv, you need to define the bootstrap component:
// application components
'components' => array(
...
'bootstrap' => array(
'class' => 'bootstrap.components.TbApi',
),
),
Regards.
ok, don't report error, but then following this http://www.getyiistrap.com/site/basics and put this code: <?php echo TbHtml::lead('...'); ?> say this error: include(TbArray.php): failed to open stream: No such file or directory
ok, I solution, after reinstall all again in my config/main.php put in array import 'bootstrap.', 'bootstrap.components.', 'bootstrap.behaviours.', 'bootstrap.helpers.', 'bootstrap.widgets.*',
then don't say error. but try this http://www.getyiistrap.com/site/widgets
$this->widget('bootstrap.widgets.TbNavbar', array( 'brandLabel' => 'Title', 'display' => null, // default is static to top 'items' => array( array( 'class' => 'bootstrap.widgets.TbNav', 'items' => array( array('label' => 'Home', 'url' => '#', 'active' => true), array('label' => 'Link', 'url' => '#'), array('label' => 'Link', 'url' => '#'), ), ), ), ));
this say errror: include(TbWidget.php): failed to open stream: No such file or directory
I have solution, in config/main.php in the array import, insert this line 'ext.bootstrap.behaviors.TbWidget', then work ok
thanks jayala for you helpme.
Hi I follow instructions of http://www.getyiistrap.com/site/started, but this report error: Property "CWebApplication.bootstrap" is not defined. what happend, helpme...
thanks