HTML::WWWTheme is a standard theme generation, including sidebars and navigation bars.
my $Theme = new HTML::WWWTheme(@args);
HTML::WWWTheme is a module that creates a standard sidebar and implements local colour conventions. It is used by the Apache::SetWWWTheme module to enforce this through the server. In fact, the code in this module was originally contained within the SetWWWTheme module, but at the suggestion of Tim Jenness, I separated this module to allow CGI programs to create standard pages that would fit in with the static pages that are automatically rewritten by the Apache module.
So, static pages in the web tree are filtered through Apache::SetWWWTheme, and CGI-generated pages are generated with the help of HTML::WWWTheme. In this manner, a consistent look and feel can be maintained in all pages. Any changes in the structure of WWWTheme are automatically reflected in both the CGI-generated and static pages.
The new() function will return a reference to a Theme object. It will accept an array of arbitrary length as arguments. Each element of this array must be a fully qualified path to a configuration file.
Configuration is accomplished in three ways. First, one may pass arguments to the new() function. These arguments must be fully qualified paths to a configuration file. The syntax of the directives in this file is simple:
or, in the case of a directive that accepts a list, the values are comma-separated and semi-colon terminated. Escaped semi-colons will be transformed into semi-colons, and will not terminate the directive.
@DIRECTIVE=value1, value2, value3;
@DIRECTIVE=value1, value2; still going, value3;
In the second example, the value2; will be replaced with value2; in the parsed text.
@INFO=< A HREF="here.html" >Here< /a >, < A HREF="there.html" >There< /a >;
Second, the GetConfiguration() function may be passed a list of full-paths to configuration files. The GetConfiguration() function will parse these files and set the appropriate values.
Finally, one may use methods to directly change the settings of the page before it is produced. This is the recommended method, because it is the most intuitive and the easiest to figure out when you're trying to figure out someone else's code. I use these methods extensively in my Apache::SetWWWTheme module.