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.flagexists - Note the host address, that refers to the
HTTP_HOST, or any other variable such as environment variables - Check if the
skinparameter 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.phtmltoerrors/sub/503.phtmlerrors/default/css/styles.csstoerrors/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)