How to get rid of “CakePHP: the PHP Rapid Development Framework” at the top of your pages

Published on and tagged with cakephp  faq  layout

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/layouts/default.ctp /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 :)

Update 2009-05-29: Fixed path to layout because it has changed since this article has been written. Thanks to Göran K. for the hint!

© daniel hofstetter. Licensed under a Creative Commons License