Hello everyone,
I’m using the Yii Booster extension which i have extracted into the directory
protected/extensions/bootstrap
I am trying to create two buttons using the code below:-
$this->widget('ext.bootstrap.widgets.TbButton',array(
'label' => 'Primary',
'type' => 'primary',
'size' => 'large'
));
$this->widget('ext.bootstrap.widgets.TbButton',array(
'label' => 'Secondary',
'size' => 'large'
));
My problem is that the stylesheet is not loading so i just get the button labels printed next to each other without the actual button. Please let me know where i could be going wrong with the configuration.
Please see attached images
Thanks
download the full bootstrap on the official website http://twitter.github.com/bootstrap/
and place the css folder localhost/yiiapp/css
resurtm
(Resurtm)
November 8, 2012, 12:56pm
3
You’re not right. YiiBooster made as ready to be instantly used solution, without need to download additional stuff (bootstrap itself, styles, etc.).
I have already downloaded the full yii booster package and extracted it into
protected/extensions/bootstrap
My problem is that the CSS files are not being loaded.
resurtm
(Resurtm)
November 8, 2012, 12:58pm
5
Did you learned about YiiBooster installation process? You can find it here: http://yii-booster.clevertech.biz/getting-started.html
Installation of the YiiBooster is not just copying directory.
Yes i did follow the installation process for Yii boster as best as I could, maybe I made a mistake somewhere. Attached is my protected/config/main.php file
resurtm
(Resurtm)
November 8, 2012, 1:33pm
7
Your configuration file is incorrect. Here is the problem part:
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'class' => 'WebUser',
'allowAutoLogin'=>true,
'loginUrl' => array('/user/login'),
'bootstrap' => array(
'class' => 'ext.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
Note that ‘bootstrap’ shouldn’t be child of the ‘user’ (as you have know). It’s application component and should be placed in the ‘components’ array. Correct code:
'user'=>array(
// enable cookie-based authentication
'class' => 'WebUser',
'allowAutoLogin'=>true,
'loginUrl' => array('/user/login'),
),
'bootstrap' => array(
'class' => 'ext.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
shingionline:
I have already downloaded the full yii booster package and extracted it into
protected/extensions/bootstrap
My problem is that the CSS files are not being loaded.
you can not put the folder in css
protected/extensions/bootstrap
protected because the folder is protected or a browser can access this folder.
why should you put in lacalhost/yiiapp/css
resurtm
(Resurtm)
November 8, 2012, 2:02pm
9
you can not put the folder in css
protected/extensions/bootstrap
protected because the folder is protected or a browser can access this folder.
why should you put in lacalhost/yiiapp/css
It’s okay to put assets files to the protected directory since YiiBooster fully leverages CAssetManager component features. They will be published in the assets folder (which is publicly available) after first application run.
did not know, thank Resurtm
resurtm:
Your configuration file is incorrect. Here is the problem part:
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'class' => 'WebUser',
'allowAutoLogin'=>true,
'loginUrl' => array('/user/login'),
'bootstrap' => array(
'class' => 'ext.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
Note that ‘bootstrap’ shouldn’t be child of the ‘user’ (as you have know). It’s application component and should be placed in the ‘components’ array. Correct code:
'user'=>array(
// enable cookie-based authentication
'class' => 'WebUser',
'allowAutoLogin'=>true,
'loginUrl' => array('/user/login'),
),
'bootstrap' => array(
'class' => 'ext.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
Thank you very much, i made this change and now all is working perfectly. Thank you also to everyone who responded to this thread
Thank you resurtm! Great support
Hi, I use the Yiibooster extension and my css is not loading.
The extension is loading, but these css files no.
Look my files main.php and my firebug log.
Someone can help me?