CakePHP与Bootstrap(来自Twitter) [英] CakePHP with Bootstrap (from Twitter)
问题描述
我是CakePHP的新手,我想知道如何使用Boostrap从布局结合蛋糕。
我主要关心的是使表单助手继续正常工作,因为我认为它使用预配置的CSS类,如果我改变默认的css,我想象Form Helper将停止工作,因为它应该。
我阅读本教程,但看起来不完整。
使用CakePHP构建PHP应用程序
谢谢大家!
:D所有当前答案都需要修改视图文件。
以下插件将Bootstrap-ify您当前的视图,而不进行任何代码/标记更改:
https://github.com/slywalker/TwitterBootstrap
所有您需要做的是别名 FormHelper和HtmlHelper,以便所有您现有的 $ this->表单
& $ this-> Html
将由插件处理。
)
I am new to CakePHP and I want to know a way to use Boostrap from Twitter in layouts combined with cake.
My main concern is to make the Form Helper continues to function normally, because I think that it uses pre-configured CSS classes, and if I change the default css, I imagine that the Form Helper will stop to work as it should.
I read this tutorial but it doesn't seems to be complete.
Build a PHP application using CakePHP and (twitter) Bootstrap, Part 1
Has anyone done this?
Thank you! :D
All current answers require changes to the view files.
The following plugin will "Bootstrap-ify" your current views without any code/markup changes:
https://github.com/slywalker/TwitterBootstrap
All you need to do is alias the FormHelper and HtmlHelper so that all your existing calls to $this->Form
& $this->Html
will be handled by the plugin instead.
Can't get easier than that :)
这篇关于CakePHP与Bootstrap(来自Twitter)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!