Bill Moseley wrote:
> Which templating output system are you using? The default one?
>
I started with TemplateDefault, and modified it.
>
> And, as you can see, that's calling the CGI.pm's script_name()
> function directly to set the action, just like above. The point is,
> Apache is running the script in the first place, so it knows the URL of
> the path.
>
> So, unless you run the script from document root, I can't think of
> anyway it set the action to /swish.cgi.
Well, I am getting a bit confused, but I am glad it works with the proper path set.
> Are you saying
> TemplateDefault.pm was installed in /usr/local/lib/swish-e/perl/?
> If so, please let me know exactly what version of swish-e you installed.
No, it was installed to the proper subdir.
> But, yes, TemplateDefault.pm is suppose to be installed in
>
> $PREFIX/lib/swsih-e/perl/SWISH/
>
> But the "use lib" line is also suppose to be:
>
> use lib '$PREFIX/lib/swish-e/perl';
>
> without the "SWISH" part because the module's name is:
>
> SWISH::TemplateDefault;
>
> When the script loads that module is combines the two paths:
>
> $PREFIX/lib/swish-e/perl + SWISH::TemplateDefault
>
> to come up with:
>
> $PREFIX/lib/swish-e/perl/SWISH/TemplateDefault.pm
Got it.
I am using CSS to format the output from TemplateDefault.pm, and loaded the
appropriate stylesheet at this point in the module:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel= "stylesheet" type="text/css" href= "/scripts/navmenu.css">
<link rel= "stylesheet" type="text/css" href "/scripts/sitestyle.css">
<script type="text/javascript" src="/scripts/nnav.js"></script>
<title>$html_title</title></head>
<body>
<h2>
$logo$title $message
</h2>
EOF
}
#==================================================================
===
# This generates the form
etc.
Styles called later in the script, for instance, on the table structure that contains
$query_simple, $search_time, etc. work as expected.
When I turned to the routine that formats each single result, specifically the <dl> that
handles the listing of each result, I find that styles called do not work, although I can
declare:
<dd style="width:65%; background-color: #DCEDED">
and the styling works as expected. If I use "<dd class="mystyle"> or <dd id="mystyle">
the styling isn't applied.
Cheers --- Phil Matt
Received on Thu Apr 15 09:47:33 2004