Reputation: 317
I have found some issues working with Twitter Bootstrap in Cakephp and having set cake.generic.css
Most tutorials are telling to use both, cake.generic.css and bootstrap.css in the same time, although there are some conflicts between styles.
On the other hand, I have found some comments on the net saying it is not needed, after setting bootstrap, to use cake.generic.css. (http://cakephp.1045679.n5.nabble.com/What-s-the-best-way-to-get-Twitter-Bootstrap-into-Cake-td5712643.html, http://thehappydeveloper.wordpress.com/2012/02/24/setting-up-twitter-bootstrap-with-cakephp/)
What is the best practice to setup Twitter Bootstrap with Cakephp?
Upvotes: 4
Views: 12139
Reputation: 113
When dealing with forms, you can make use of the Bootstrap 3 FormHelper we created, that pretends to be highly configurable and let us do none or minimal additional coding. You are able to create inline or horizontal forms easily, or even create new form styles and apply them globally in your app. You can download it and see instructions/examples at http://bs3form.qtsdev.com.
Bs3Form tries to be a better alternative to the the BoostCakeForm (it's just a helper, not an entire plugin). Some of the main features are: Creation of default / horizontal / inline forms with almost no additional configuration, creation of static controls, adding feedback or input groups easily, global options and styles definitions that remove the need to define inputDefaults in every form, external wrapping for smaller input in horizontal forms that prevent help/error messages unnecesarily breaking, etc.
Upvotes: 0
Reputation: 3879
Working with Twitter Bootstrap is not any different than working with any other frontend framework. That being said, you don't need to keep default css if you are not going to use it. Just modify your layout to include the css/js files as usual and style your elements in the way Bootstrap is expecting you to do it.
However, since nobody likes to reinvent the wheel I would suggest to use a CakePHP plugin that handles all that for you, here is one
Upvotes: 2