A siteaccess may make use of several designs. This means that the final result generated by eZ publish (the actual HTML) can be a combination of files originating from various designs. A siteaccess is capable of using a combination of the following:
A siteaccess should always have at least a main design and a standard design. While the main design can be set to anything, the standard design should not be modified. The default configuration is to use the built-in standard design. It ensures that eZ publish always finds the necessary templates and thus any kind of content can be rendered without problems. A more in-depth explanation is presented below.
If eZ publish is unable to find a design specific file (a stylesheet, a template, an image, etc.) within the main design, it will automatically attempt to locate the file elsewhere. The system will sequentially go through all the additional designs (if specified), looking for the requested file. At last, if the requested file still hasn't been found, eZ publish will attempt to locate the missing file within the standard design. The following diagram illustrates this functionality.
The design fallback mechanism.
The different designs to be used by must be defined in the "[DesignSettings]" block within an override for the "site.ini" configuration file. The following directives can be used:
The "SiteDesign" directive specifies the main design. The "AdditionalSiteDesignList" directive specifies an array of additional site designs. The "StandardDesign" directive specifies the standard design. Even though it is possible to change the standard fallback design, it is not a good idea to do so. The "StandardDesign" directive should always be set to the built-in standard design. This is already defined in the default "site.ini" file and thus there is no need to set the standard design from within an override. If there is a need for a custom fallback design, it should be specified using the "AdditionalSiteDesignList" setting. The automatic fallback mechanism opens up for a lot of possibilities and flexibility. For example, it makes the reuse and combination of designs an easy matter.
The following example shows how to configure the following design settings in an override for the "site.ini" configuration file:
... [DesignSettings] SiteDesign=my_design AdditionalSiteDesignList[]=fallback_one AdditionalSiteDesignList[]=fallback_two StandardDesign=standard ...
In this particular case, if eZ publish is unable to find the requested file within the main design "my_design", it will automatically fallback to the additional designs. At first, the system will look for the requested file within the "fallback_one" design directory. If the requested file is not found, the system will look in the "fallback_two" design directory. If the file still hasn't been found, the system will attempt to locate it within the "standard" design directory. The standard directory will most likely contain the requested file (unless a custom template/override is requested).
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.