Pessoal,
Estou tentando usar essa extension de bootstrap : http://www.yiiframew...nsion/bootstrap
e essa de less : http://www.yiiframew.../extension/less
Segui o setup da maneira como indicam nas extensions, mas estou sem orientação para descobrir o que há de errado. Depois de configurar o main.php e tentar acessar a aplicação sempre encontro esse erro: Property "CWebUser.less" is not defined.
Então, alguém aqui que já usou e sabe configurar pode me passar uma orientação ?
Vlws
Page 1 of 1
Bootstrap Yii e Less
#2
Posted 03 August 2012 - 11:44 AM
Coloque o seu main.php aqui para podermos ajudar
Hebert Porto, on 03 August 2012 - 10:24 AM, said:
Pessoal,
Estou tentando usar essa extension de bootstrap : http://www.yiiframew...nsion/bootstrap
e essa de less : http://www.yiiframew.../extension/less
Segui o setup da maneira como indicam nas extensions, mas estou sem orientação para descobrir o que há de errado. Depois de configurar o main.php e tentar acessar a aplicação sempre encontro esse erro: Property "CWebUser.less" is not defined.
Então, alguém aqui que já usou e sabe configurar pode me passar uma orientação ?
Vlws
Estou tentando usar essa extension de bootstrap : http://www.yiiframew...nsion/bootstrap
e essa de less : http://www.yiiframew.../extension/less
Segui o setup da maneira como indicam nas extensions, mas estou sem orientação para descobrir o que há de errado. Depois de configurar o main.php e tentar acessar a aplicação sempre encontro esse erro: Property "CWebUser.less" is not defined.
Então, alguém aqui que já usou e sabe configurar pode me passar uma orientação ?
Vlws
#3
Posted 03 August 2012 - 12:07 PM
Opa !
Esse aqui é o meu main.php
Esse aqui é o meu main.php
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'Bootstrap and Less',
// preloading 'log' component
'preload'=>array(
'log',
'less',
'bootstrap', // preload the bootstrap component
),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'123456',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
//'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array(
'bootstrap.gii', // since 0.9.1
),
),
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
'less'=>array(
'class'=>'ext.less.components.LessCompiler',
'paths'=>array(
'protected/extensions/bootstrap/lib/bootstrap/less/bootstrap.less' => 'protected/extensions/bootstrap/assets/css/bootstrap.min.css',
'protected/extensions/bootstrap/lib/bootstrap/less/responsive.less' => 'protected/extensions/bootstrap/assets/css/bootstrap-responsive.min.css',
),
),
'bootstrap'=>array(
'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
),
),
[ ... ]
#4
Posted 03 August 2012 - 12:27 PM
O meu ta igual o seu, porem o import ta assim aki:
e descompactei a extensao em:
Assim funcionou, mas so uso o bootstrap.
'import'=>array(
'application.models.*',
'application.components.*',
'application.extensions.*',e descompactei a extensao em:
protected\extensions\bootstrap
Assim funcionou, mas so uso o bootstrap.
#5
Posted 03 August 2012 - 05:03 PM
Olha no código abaixo o comentário: //FALTOU FECHAR ESSE PARENTESES
Correto?
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
), //FALTOU FECHAR ESSE PARENTESES
'less'=>array(
'class'=>'ext.less.components.LessCompiler',
'paths'=>array(
'protected/extensions/bootstrap/lib/bootstrap/less/bootstrap.less' => 'protected/extensions/bootstrap/assets/css/bootstrap.min.css',
'protected/extensions/bootstrap/lib/bootstrap/less/responsive.less' => 'protected/extensions/bootstrap/assets/css/bootstrap-responsive.min.css',
),
),
'bootstrap'=>array(
'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
),
),
Correto?
Hebert Porto, on 03 August 2012 - 12:07 PM, said:
Opa !
Esse aqui é o meu main.php
Esse aqui é o meu main.php
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'Bootstrap and Less',
// preloading 'log' component
'preload'=>array(
'log',
'less',
'bootstrap', // preload the bootstrap component
),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'123456',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
//'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array(
'bootstrap.gii', // since 0.9.1
),
),
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
'less'=>array(
'class'=>'ext.less.components.LessCompiler',
'paths'=>array(
'protected/extensions/bootstrap/lib/bootstrap/less/bootstrap.less' => 'protected/extensions/bootstrap/assets/css/bootstrap.min.css',
'protected/extensions/bootstrap/lib/bootstrap/less/responsive.less' => 'protected/extensions/bootstrap/assets/css/bootstrap-responsive.min.css',
),
),
'bootstrap'=>array(
'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
),
),
[ ... ]
Share this topic:
Page 1 of 1

Help














