title: Layout for my error pages - CakePHP
body: <p>According to the CakePHP 2.x <a href="https://book.cakephp.org/2.0/en/development/exceptions.html#exception-renderer" rel="nofollow noreferrer">cookbook</a>:</p>
  
  <p>By default <code>app/Layouts/default.ctp</code> layout is used for error pages.</p>
  
  <p>If you want to use another layout <code>app/Layouts/my_error.ctp</code> for your error pages, then simply edit the error views and add the statement <code>$this-&gt;layout = 'my_error'</code> to the <code>error400.ctp</code> and <code>error500.ctp</code>.</p>
  
  <p>So, I would like to use custom layouts for my error pages. Can someone show me the code examples of how can I do that?</p>