Я использую Yii-Bootstrap в своем новом проекте Yii. Я точно выполнил инструкции по установке.Yii Bootstrap не загружает файлы JS
На первой странице я использую плагин JS Carousel.
$this->widget('bootstrap.widgets.TbCarousel', array(
'items'=>array(
array(
'image'=>'http://placehold.it/770x400&text=First+thumbnail',
'label'=>'asdf',
'caption'=>'Cras justo odio, '
),
array(
'image'=>'http://placehold.it/770x400&text=Second+thumbnail',
'label'=>'asdf',
'caption'=>'Cras justo odio, '
),
array(
'image'=>'http://placehold.it/770x400&text=Third+thumbnail',
'label'=>'asdf',
'caption'=>'Cras justo odio, '
),
),
));
Uncaught TypeError: Object [object Object] has no method 'carousel'
Это приводит к .carousel()
не найдена ошибка. Это похоже на то, что файлы JS не регистрируются. CSS и все выглядит отлично.
Я использую расширение юй-среды ..
return array(
// Set yiiPath (relative to Environment.php)
'yiiPath' => dirname(__FILE__) . '/../../../yii-1.1.13/framework/yii.php',
'yiicPath' => dirname(__FILE__) . '/../../../yii-1.1.13/framework/yiic.php',
'yiitPath' => dirname(__FILE__) . '/../../../yii-1.1.13/framework/yiit.php',
// Static function Yii::setPathOfAlias()
'yiiSetPathOfAlias' => array(
// uncomment the following to define a path alias
'bootstrap' => realpath(dirname(__FILE__).'/../extensions/bootstrap')
),
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
'configWeb' => array(
'basePath' => dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'theme' => 'bootstrap',
// Preloading 'log' component
'preload' => array('log'),
// Autoloading model and component classes
'import' => array(
'application.models.*',
'application.components.*',
),
// Application components
'components' => array(
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
Любые предложения?
Да, почему это не упомянуто? Спасибо, я сделаю это. – Webnet