有没有一种可靠的方法将Zurb Foundation CSS框架与CakePHP一起使用?

我正在查看当前只是原始PHP / HTML / CSS混搭的应用程序的主要更新 。 </ p>

我想使用CakePHP MVC作为后端,使用Zurb Foundation作为前端。 虽然我似乎无法找到连接两者的方法。 </ p>

我知道洛伦佐的回购但是没有 不确定是否有另一种方式。 似乎这个回购并没有被全部使用。 它在几年内没有更新。 当然有人一起使用了CakePHP和Foundation?</ p>
</ div>

展开原文

原文

I'm looking at a major update to an application that is currently just a mashup of raw PHP/HTML/CSS.

I want to use CakePHP MVC as the backend and Zurb Foundation as the front end. Although I can't seem to find a way to connect the two.

I am aware of lorenzo's repo but wasn't sure if there was another way. It seems like this repo is not used whole lot. It hasn't been updated in a couple years. Surely someone has used CakePHP and Foundation together?

1个回答




虽然我似乎无法找到连接两者的方法。</ p>
</ blockquote>

重点是他们没有以任何方式连接。 php和CakePHP(以及任何其他框架)在大多数情况下也会生成HTML默认输出。 您可以完全自由地编写用于生成输出的模板。</ p>

MVC设计模式的一个关键原则是将视图与业务逻辑分开。 你仍然会在那里使用php,但不会像你的mashup那样。 只需将Zurb CSS框架的CSS文件添加到您的布局文件中,并相应地在视图中应用所有样式。</ p>

没有插件可以将您的所有视图神奇地转换为bootstrap或zurb兼容 HTML,如果这就是你要找的东西。 zurb / bootstrap的所有插件只会修改一些生成HTML的CakePHP核心辅助方法,它们会生成CSS框架所期望的标记。</ p>

我建议你去 做博客教程并阅读手册的视图和帮助部分。</ p>
</ div>

展开原文

原文

Although I can't seem to find a way to connect the two.

The point is that they're not connected in any way. php and CakePHP (and any other framework) as well produce in most cases HTML as output by default. You're totally free how you write your templates that are used to generate the output.

One of the key principles of the MVC design pattern is to separate the view from business logic. You'll still use php there but not in the way your mashup does. Just add the CSS file of the Zurb CSS framework to your layout file and apply all the styling in your views accordingly.

There is no plugin that magically turns all your views into bootstrap or zurb compatible HTML if thats what you're looking for. All the plugins for zurb / bootstrap will just modify some of the CakePHP core helper methods that generate HTML in a way that they'll produce the markup the CSS framework expects.

I recommend you to do the blog tutorial and read the view and helper section of the manual.

doufang6268
doufang6268 是。 这基本上就是我结束的地方。 我将Zurb CSS文件添加到default.ctp并改变页面视图以输出zurb风格的HTML。 谢谢你的回复!
大约 6 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐