Custom 404 error page with CakePHP

1. Create your error layout in app/view/layouts/
2. Create your 404 error view in app/view/errors/
In /cake/libs/view/errors you will find all the default error views.
You can copy and paste error404.ctp in your app/view/errors directory or create a new file and customize this view as you like.
3. Set the error layout in app_controller.php
Then add this to your app_controller.php :
function _setErrorLayout() {  
  if ($this->name == ‘CakeError’) {  
    $this->layout = ‘error’;  

function beforeRender () {