0
votes

I made a custom 404 page using error400.ctp. In this case message from error404.ctp is correct but header and footer of the page are escaped.

Do you know how can I disable escaping html in case of an error?

CakePHP 2.0

1

1 Answers

0
votes

Header and footer will behave the same in 404 page as in other pages. just include your layout $this->layout = 'your layout name' within 404 page and the header and footer will show properly as in other pages and if is there any special characters within your header's title then their you can use escape => false option within your link.

<?php
   if (Configure::read('debug') > 0):
       echo $this->element('exception_stack_trace');
   else:
       echo $this->layout = 'your layout name';
 ?>
   // make you page stylish
 <?php endif; ?>