Pergunta

According to the CakePHP 2.x cookbook:

By default app/Layouts/default.ctp layout is used for error pages.

If you want to use another layout app/Layouts/my_error.ctp for your error pages, then simply edit the error views and add the statement $this->layout = 'my_error' to the error400.ctp and error500.ctp.

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?

Foi útil?

Solução

Just write $this->layout = 'my_error' in your error400.ctp and error500.ctp files

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top