How to get rid of “CakePHP: the PHP Rapid Development Framework” at the top of your pages
An often asked newbie question in the IRC channel is: How can I get rid of “CakePHP: the PHP Rapid Development Framework” at the top of my pages?
This header is shown because you don’t have defined your own layout yet, and so the default layout is used which comes with CakePHP (located in /cake/libs/view/templates/layouts/default.ctp (respectively .thtml with CakePHP 1.1)). Now the first idea is to edit this file. That would work. But it violates the golden rule of CakePHP: Don’t edit files in the cake folder! So instead you have to copy the file to /app/views/layouts. Then you can edit the layout in any way you want.
Happy baking :)




lol @ google ads :-)
Another hot tip for Cake newbies: read the manual! ;)
“Cake’s default layout can be overridden by placing a new default layout at /app/views/layouts/default.thtml.”
@Dieter: Yeah, sometimes the Google algorithms are not that good in providing related ads ;-)
@jiri: Thanks for the additional tip :)
Good deal, thanks!
I’ve read through the manual entirely, but without actually applying it during the reading process to something concrete, a lot of the information squeezed out of that mass between my ears. Extra reminders are always helpful (especially since I should be starting my first CakePHP project very soon).
@Brendon: Yes, only reading the manual is probably not that efficient ;-) Learning by doing is imho more efficient, so I can only recommend to start your own CakePHP project. Good luck!
Definitely not efficient at all. But, it still gives me a decent background or simple understanding of the features and syntax. Even better, I have a good idea of where I need to look in the manual to find an answer to something (at least, that’s the plan).
Still, tips are always great. Thanks, Dan! ;)