Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top