Gossamer Forum
Home : Products : Links 2.0 : Discussions :

How do I make my header/ footer files work on cgi

Quote Reply
How do I make my header/ footer files work on cgi
So far no problems with instalation except for one problem, I cannot get my header and footer text files to work on cgi generated pages such as search.cgi and add.cgi. I have read all the header and footer tutorials and I have them working fine on the template pages just not in the cgi pages. Please help..

Thanks,
Ed

Quote Reply
Re: How do I make my header/ footer files work on cgi In reply to
Are you using ssi to create the header and footers. I use something like this in mine:
In site_html_templates.pl:
Put this in the globals section:
header_links => &header_links

And create this subroutine anywhere in site_html_templates,with the other subs:
sub header_links {
# -----------------------------------
# This is the header file to insert into your LINKS pages.
open (INC, "/absolute/path/to/header_links.txt") or return "Can't find include file: header_links.txt";
return join ("", <INC> );
}
.
Then all you have to do is add this to all your template files where you want the header to appear:
<%header_links%>
You can change the name of the file of course. Remember to backup before you make changes.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: How do I make my header/ footer files work on cgi In reply to
works beautifully!!
just need to remove that dot (.) at the end....

thx

Quote Reply
Re: How do I make my header/ footer files work on cgi In reply to
Sorry, that wasn't supposed to be in there. I was just ending a sentence I guess because it is black. Glad it worked.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans