Error pages (code 404, code 500, etc.) can be customized for each skin. This keeps the display consistent.

Define an error page

Error pages are static HTML pages, and can be defined for each language. A Apache configuration will ensure that the right page is served in the right circumstances.

Warning!
These pages must be created in a skins/[skinName]/error folder on the site side, and all the resources required to display error pages should CMS be unavailable.

For example, for a 404 error with the site available in English and French and using the demo graphic charter, you need to create two files 404.html.en and 404.html.fr in the skins/demo/error folder on the site side and add all its resources there too.

404.html.fr

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta content="IE=9" http-equiv="X-UA-Compatible" />
        <link href="/kernel/resources/img/runtime_favico.gif" type="image/gif" rel="icon" />
        <link href="/kernel/resources/img/runtime_favico.ico" type="image/x-icon" rel="shortcut icon" />
        <meta content="fr" name="language" />
        <meta name="subject" content="" />
        <meta name="description" content="error" />
        <meta content="Text" name="DC.type" />
        <meta content="text/html" name="DC.format" />
        <meta content="fr" name="DC.language" />
        <meta content="fr" name="DC.coverage" />
        <title>Erreur 404</title>
        <link media="screen" rel="stylesheet" href="/error/resources/css/ametys.css" type="text/css" />
    </head>
    <body>
        <div class="header">
            <p>
                <a title="Retour sur la page d'accueil" href="/fr/index.html">
                    <img alt="Démonstration" src="/error/resources/img/logo.png" />
                </a>
            </p>
        </div>
        <div id="content">
            <div class="breadcrumb" id="breadcrumb">
                <span class="breadcrumb-title-invisible">Vous êtes ici :</span>
                <ul>
                    <li class="first"><a href="/fr/index.html">index</a></li>
                    <li class="current"><span>Erreur 404</span></li>
                </ul>
            </div>
            <h1>Erreur 404 - Page non trouvée</h1>
        </div>
    </body>
</html>

Configuration
To configure redirection to error pages, see Server installation.

Back to top