Bugzilla Question:
Download Job Interview Questions and Answers PDF
The index.html page does not show the footer. It is really annoying to have to go to the querypage just to check my my bugs link. How do I get a footer on static HTML pages?
Answer:
It's possible to get the footer on the static index page using Server Side Includes (SSI). The trick to doing this is making sure that your web server is set up to allow SSI and specifically, the #exec directive. You should also rename index.html to index.shtml.
After you've done all that, you can add the following line to index.shtml:
< !--#exec cmd="/usr/bin/perl -e "require 'CGI.pl'; PutFooter();"" -->
This line will be replaced with the actual HTML for the footer when the page is requested, so you should put this line where you want the footer to appear.
Because this method depends on being able to use a #exec directive, and most ISP's will not allow that, there is an alternative method. You could have a small script (such as api.cgi) that basically looks like:
#!/usr/bonsaitools/bin/perl -w
require 'globals.pl';
if ($::FORM{sub} eq 'PutFooter') {
PutFooter();
} else {
die 'api.cgi was incorrectly called';
}
and then put this line in index.shtml.
<!--#include virtual="api.cgi?sub=PutFooter"-->
After you've done all that, you can add the following line to index.shtml:
< !--#exec cmd="/usr/bin/perl -e "require 'CGI.pl'; PutFooter();"" -->
This line will be replaced with the actual HTML for the footer when the page is requested, so you should put this line where you want the footer to appear.
Because this method depends on being able to use a #exec directive, and most ISP's will not allow that, there is an alternative method. You could have a small script (such as api.cgi) that basically looks like:
#!/usr/bonsaitools/bin/perl -w
require 'globals.pl';
if ($::FORM{sub} eq 'PutFooter') {
PutFooter();
} else {
die 'api.cgi was incorrectly called';
}
and then put this line in index.shtml.
<!--#include virtual="api.cgi?sub=PutFooter"-->
Download Bugzilla Interview Questions And Answers
PDF