【问题标题】:Yii Bootstrap not working, the grid is huge, the dropdowns don't drop, toggles fail to do soYii Bootstrap 不工作,网格很大,下拉菜单不掉,切换失败
【发布时间】:2013-02-19 23:39:40
【问题描述】:

该页面具有引导皮肤,但我不确定为什么某些操作(例如在下拉导航栏上显示列表、按钮上的加载选项也不起作用、网格很大等)。

Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');

return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'name project', 

    // preloading 'log' component
    'theme'=>'bootstrap',
    'preload'=>array('log', 'bootstrap'),

    // autoloading model and component classes
    'import'=>array(  
        'application.models.*', 
        'application.components.*',
        'ext.bootstrap-theme.widgets.*',
        'ext.bootstrap-theme.helpers.*',
        'ext.bootstrap-theme.behaviors.*',
    ),

    'language'=>'es',

    'modules'=>array(
        // uncomment the following to enable the Gii tool

        'gii'=>array(
            'class'=>'system.gii.GiiModule',
            'password'=>'swjskowk',
            'ipFilters'=>array('127.0.0.1','::1'),
            'generatorPaths'=>array(
                'ext.bootstrap-theme.gii',
                'bootstrap.gii',
            ),
        ),

    ),

    // application components
    'components'=>array(
        'bootstrap'=>array(
            'class'=>'ext.bootstrap.components.Bootstrap',
        ),
        'user'=>array(
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
        ),
        // 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>',
                'gii'=>'gii',
                'gii/<controller:\w+>'=>'gii/<controller>',
                'gii/<controller:\w+>/<action:\w+>'=>'gii/<controller>/<action>',
            ),
        ),?>

我有一个文件夹名称 bootstrap 主题,一个 bootstrap 扩展名和 bootstrap-theme 扩展名

【问题讨论】:

    标签: php css twitter-bootstrap yii


    【解决方案1】:

    修复组件部分

    'bootstrap'=>array( 'class'=>'ext.bootstrap.components.Bootstrap', ),

    我觉得应该是的

    bootstrap'=>array( 'class'=>'bootstrap.components.Bootstrap', ),

    【讨论】:

      【解决方案2】:

      可能是您没有加载需要 boostrap 以便能够在导航栏中显示下拉列表等的 javascript。

      【讨论】:

        猜你喜欢
        • 2012-10-31
        • 2014-08-15
        • 1970-01-01
        • 1970-01-01
        • 2020-07-11
        • 1970-01-01
        • 1970-01-01
        • 2018-01-21
        • 1970-01-01
        相关资源
        最近更新 更多