Closed karlingen closed 9 years ago
Use the bs3-branch.
@marcovtwout i can not to configure bs3. I followed the tutorial using a composer in yii 1.1.16. can i help me?
i saw this, but doesn't works
Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.
In your config/main.php file you should declare
'aliases' => array(
'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),
),
Now shows this error
Notice: Undefined property: CWebApplication::$bootstrap
the problem is here
'bootstrap' => array( 'class' => '\TbApi', ),
Well, your configuration looks like you are using Composer. If not try this:
'import' => array(
...
'bootstrap.helpers.*',
),
...
'components' => array(
...
'bootstrap' => array(
'class' => 'bootstrap.components.TbApi',
),
),
If i put 'class' => 'bootstrap.components.TbApi'
show me the error
Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.
else shows the error above
My apologies, I gave you the wrong configuration try with this:
'aliases' => array(
'vendor.twbs.bootstrap.dist' => realpath(__DIR__ . '/../vendor/twbs/bootstrap/dist'),
),
'components' => array(
'bootstrap' => array(
'class' => '\TbApi',
),
),
That is asuming you are using Composer.
does not works :(
Then you should install Composer..
I am using composer .. but with or without composer does not work
Ok, are you sure you have your composer.json like this?:
{
"name": "myvendor/myapp",
"require": {
"php": ">=5.1.0",
"yiisoft/yii": "1.1.*",
"crisu83/yiistrap": "dev-bs3"
}
}
i already did it.
@crisu83 can you help ?
I'm afraid I cannot do much with the details you've provided, maybe you could tell us what the error is that you are getting and provide us with both your application configuration and composer.json (gist/pastebin please).
I came across the same problem when installing yiistrap.
The problem for me was that I did not have Bootstrap installed! I found two solutions. 1) Use Bootstrap from a public CDN. ( Eg https://maxcdn.bootstrapcdn.com ) To set this up just ADD a single line in your config/main.php
'components'=>array(
...
'bootstrap'=>array(
...
'cdUrl'=>"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/",
),
),
2) You can host Bootstrap yourself. Download Bootstrap from getbootstrap.com Extract into /protected/vendor/twbs/bootstrap/dist
You have a typo on your example, it should be cdnUrl
not cdUrl
.
Any plans on implementing v3.2?