Mr B
Mr B

Reputation: 4130

How to add custom layout and css in a CakePHP application?

I'm about to begin developing a CakePHP application, I understand CakePHP is aimed at allowing developers to put a web application together as quickly as possible hence it comes with default CSS and layouts for the views.

How would I go about replacing this default layout and CSS? I read briefly about 'themes' but don't understand what they do exactly.

Appreciate the help.

Upvotes: 2

Views: 8644

Answers (2)

saja
saja

Reputation: 21

Stylesheets are in app/webroot/css/. I would advise to leave the standard cake.generic.css alone and create a new file (or a copy of the generic file) to work with. You should link to the correct css file in your layout.

Upvotes: 2

Arjan
Arjan

Reputation: 9874

You can copy the default layout from cake/libs/view/layouts/default.ctp to app/views/layouts/default.ctp and edit the copied file. (Do not edit anything in the cake folder, only in app.)

Stylesheets are in app/webroot/css/. I would advise to leave the standard cake.generic.css alone and create a new file (or a copy of the generic file) to work with. You should link to the correct css file in your layout.

Upvotes: 9

Related Questions