ezekielweb
ezekielweb

Reputation: 33

Is there a solid way to use the Zurb Foundation CSS framework with CakePHP?

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?

Upvotes: 1

Views: 1397

Answers (1)

floriank
floriank

Reputation: 25698

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.

Upvotes: 5

Related Questions