How add bootstrap theme

256 views
Skip to first unread message

Ravi Teja Lokineni

unread,
Oct 20, 2012, 3:52:42 PM10/20/12
to yii-bo...@googlegroups.com
Hi,

This may be asked before, but I'm very new here. So please bear with me.

I've installed bootstrap as instructed here: http://www.cniska.net/yii-bootstrap/setup.html

I don't find the default theme updated to bootstarp. How should I do that? Please help me out.

Christoffer Niska

unread,
Oct 21, 2012, 2:18:05 AM10/21/12
to yii-bo...@googlegroups.com

Heh Raviteja,

There is no theme for bootstrap. You need to implement it yourself.

-Chris

Ravi Teja Lokineni

unread,
Oct 21, 2012, 3:14:12 AM10/21/12
to yii-bo...@googlegroups.com

Any tips on how to achieve that like a beginners guide?

I've seen in the extension-source of github, main.php layout has Widgets of navigation bar and others in use. So should I be doing the same to override gii layout and app layout?

Ravi Teja Lokineni

unread,
Oct 21, 2012, 3:16:45 AM10/21/12
to yii-bo...@googlegroups.com

A minor typo: 'extension source on github'

Ravi Teja Lokineni

unread,
Oct 24, 2012, 2:51:27 AM10/24/12
to yii-bo...@googlegroups.com
Anyone?

Matt

unread,
Oct 30, 2012, 5:39:52 AM10/30/12
to yii-bo...@googlegroups.com
Hi Ravi, 

I'm implementig a theme using yii-bootstrap. 
I added and configured the extension to my website and added the theme where I only changed the main layout, contact and login pages. Is this what are you looking for?

Il giorno mercoledì 24 ottobre 2012 08:51:28 UTC+2, Ravi Teja Lokineni ha scritto:
Anyone?

Ravi Teja Lokineni

unread,
Oct 30, 2012, 2:29:58 PM10/30/12
to yii-bo...@googlegroups.com
If I understand correctly, this is what you did:
  1. Let's say your website is www/my-app
  2. You placed extracted bootstrap under www/my-app/protected/extensions/bootstrap
  3. Modified protected/config/main.php
  4. Modified login page and other views? correct?
Or was there any extra step like placing any custom css apart from the one provided by bootstrap extension?
--
Ravi Teja Lokineni | Software Engineer
SemanticBits India Pvt. Ltd.



Mat

unread,
Oct 30, 2012, 3:16:37 PM10/30/12
to yii-bo...@googlegroups.com
For the #1 I create a new webapp with the "yiic webapp"

For the #4 i created a theme like in the following image:


I don't know if it is the best way... but it works quite good :)

In the main.php I set a bootstrap compliant layout.

Christoffer Niska

unread,
Oct 31, 2012, 2:35:46 AM10/31/12
to yii-bo...@googlegroups.com

By default the extension loads its own CSS and javascript if you preload it.

-Chris

Mat

unread,
Oct 31, 2012, 3:33:48 AM10/31/12
to yii-bo...@googlegroups.com
Sorry Chris. I didn't catch the point of your last post...

Ravi Teja Lokineni

unread,
Oct 31, 2012, 4:55:04 AM10/31/12
to yii-bo...@googlegroups.com
Hi Chris,

Yes, it loaded it's own css. So can I go ahead and use the gird system(http://twitter.github.com/bootstrap/scaffolding.html) without adding any  customized css.

@Mat,
Once you have added bootstrap in extensions and configured your main.php. Then when you open up your page and view the generated html source you should be seeing some javascript and css files related to bootstrap. @Chris, please correct me if I'm wrong.

Crisu83

unread,
Dec 21, 2012, 8:00:48 AM12/21/12
to yii-bo...@googlegroups.com
Since version 2.0.0 there is 

Crisu83

unread,
Dec 21, 2012, 8:01:25 AM12/21/12
to yii-bo...@googlegroups.com
Since version 2.0.0 a base theme can be found under the theme folder.

-Chris

On Saturday, October 20, 2012 10:52:42 PM UTC+3, Ravi Teja Lokineni wrote:
Reply all
Reply to author
Forward
0 new messages