Error pages¶
Introduction¶
If you want to set up multiple stores with a different layout and localized content for each store, this is done by passing the $_GET['skin']
parameter to the intended processor In the example below, we are using a 503
type error template file, which requires localized content.
The constructor of the Error_Processor
class accepts a skin
GET parameter to change layout:
This can also be added a rewrite rule in the .htaccess
file that will append a skin
parameter to the URL.
The $_GET['skin']
parameter¶
To use the skin
parameter:
- Check if the
maintenance.flag
exists - Note the host address, that refers to the
HTTP_HOST
, or any other variable such as ENV variables - Check if the
skin
parameter exists - Set the parameter by using the rewrite rules below.
Rewrite rule¶
This is what it looks like as a rewrite rule:
Copy files¶
Copy the following files:
errors/default/503.phtml
toerrors/sub/503.phtml
errors/default/css/styles.css
toerrors/sub/styles.css
Edit these files to provide localized content in the 503.phtml
file and custom styling in the styles.css
file.
Ensure your paths point to your errors
directory. The directory name must match the URL parameter indicated in the RewriteRule. In the example above, the sub
directory is used, which is specified as a parameter in the RewriteRule (skin=sub
)