Apache::SetWWWTheme is a standard theme generation, including sidebars and navigation bars.
Within the httpd.conf or other apache configuration file:
< Location /some/subtree >
PerlSetVar CONFIG_FILE /WWWroot/configfile
< /Location >
The SetWWWTheme module provides a server-based look-and-feel configuration for an entire webtree. This module allows the server to introduce a common navigation side-bar. It also provides mechanisms to control the background color and background picture for a web page.
This is implemented in a layered fashion. The module first reads the server directives. This sets defaults, and decides what users may have control over. Server directives may only be set by the webmasters. Following these, the module reads local directives. These directives are specified in a file, and will affect all files in that same directory, as well as subdirectories underneath it. They are set at the user-level, and so they are subject to the constraints imposed by the server directives. Finally, the module parses the individual HTML files. Within a file, an HTML authour may override the settings given in the local directives. Again, these are subject to the constraints of the server directives.
Please note that you are not required to change anything in your pages. Your unmodified HTML will work just fine with this module. You are required to make changes only if you wish to take advantage of the features offered.
At the server level, the webmaster has full access to all directives. These tags are specified in a file that is set in the httpd.conf file. If a webmaster would like his/her subtree to use the module, a < LOCATION > tag is used to activate the module. A PerlSetVar is used to tell the module the name of the configuration file. Here is an example:
< Location / >
PerlSetVar CONFIG_FILE /WWW/ServerConfig
< /Location >
This example will use the module for the entire document tree. The CONFIG_FILE variable is used by the module to look for the file that controls the defaults for the entire site. Please note that CONFIG_FILE takes the full path to the file name on the file-system -- do not list this file relative to the document root.
The creation of printable versions of pages has been greatly simplified. No longer is any configuration required -- the page is automatically generated using a GET method. Adding "?printable" to a URI will cause the page to be displayed in a printable manner, for example.
The server-level configuration is primarily to set defaults. It is also to set restrictions on the configurability of the rest of the site. The server-level configuration decides whether or not individual authours will be permitted to, for example, change the background colour and background image of their web pages.
Once again, the server configuration may make use of all of the following directives. The server then decides which of these the users may override.
Any authour may create a text file containing directives. The name of this file is set by the server directive @LOCALCONFIGFILE, with a default of LookAndFeelConfig. This file will affect all HTML files within that directory, as well as any subdirectories. These directives are subject to the restrictions placed by the server-level configuration. This file is intended to be used to set common settings for a tree. For example, one may wish to set the background colour for an entire tree to white. Then a @BGCOLOR=#FFFFFF; directive in the local config file. file will set this. Directives that are explicitly set override the server settings (if allowed). Otherwise, the server's settings persist.
Individual file configuration
This is the final level of configuration. Any authour may embed directives within a comment tag in an HTML file, as long as this tag appears before the < BODY > tag. Directives that are explicitly set override the local configuration and/or server settings (if allowed). Otherwise, the local settings and the server settings persist.
- original version; created by h2xs 1.18