Magento How-to: Custom Error Page Design

A question was asked in the comments of a previous post about creating a custom design for the error “report” page of Magento. Another reader, from PILLWAX Industrial Solutions Consulting gave us this solution.

Edit: This post was originally written for.. well, actually I have no idea what version of Magento was around back then.. maybe 1.4? But since then the /report directory has changed to the /errors directory, so keep that in mind!

Create the layout First we need to create a layout file. This is called design.xml, is placed in the /report directory and has the following content.

1
2
3
4
5
<?xml version=”1.0″ encoding=”UTF-8″?>
<design>
    <template>error.phtml</template>
</design>

Create the template The current report template is held in /report/skin/default/index.phtml. Let’s make a copy of that index.phtml and call it error.phtml. We can then make all of the necessary improvements to the the template in error.phtml.

We’re done!