Gossamer Forum
Home : Products : Links 2.0 : Customization :

SSI and pages generated by cgi???

Quote Reply
SSI and pages generated by cgi???
I'm setting my site up to take advantage of SSI but I've found that every page that is generated by a cgi script doesn't recognize the SSI tag. I've tried making sure the html that is to be parsed is in the same directory as the page generated but it still doesn't work. Is there any way around this??

Thanks . . . Scott
http://boise.usearchit.com
Quote Reply
Re: SSI and pages generated by cgi??? In reply to
You cannot use SSI inside of CGI generated web pages. Someone may correct me here but I've never seen it done except on static pages which aren't generated directly from CGI.

------------------
Premier Networks - Free Domain Name Registration - http://www.premier-hosting.com
Quote Reply
Re: SSI and pages generated by cgi??? In reply to
Ok, but what about a page that is used as a template.

For instance, the templates html pages used with links. The html page can include the call for SSI but why does it not work when that page is called by the script. It is my understanding that the only reason the script calls the page at all is to update or parse the information from the script onto the template.

I don't understand why the ssi would not work. When you check the source code of the html page after it is returned by the script you can see the SSI code. So if the code is still there then for some reason the server has ignored it and not parsed it with SSI.

I guess what I'm looking for is a simple way to update the many pages. If I change something in the header or footer I need to make those changes to every template page, which is very tedious and leaves room for errors. Is there a simple way without using frames to modify just one page to have it reflect on all pages with in thge pages controled by the script.

Thanks . . . Scott

------------------
Boise Idaho's Online
Discussion Forum
www.tvweb-id.com


Quote Reply
Re: SSI and pages generated by cgi??? In reply to
Scott,

If all you are interested in is a header and footer that will be on all pages, there is no reason to put them in each individual template file. For example, in the default Links, each template file has:

Code:
<p><small class="menu">|
<a class="menulink" href="<%build_root_url%>">Home</a> |
<a class="menulink" href="<%db_cgi_url%>/add.cgi">Add a Site</a> |
<a class="menulink" href="<%db_cgi_url%>/modify.cgi">Modify a Site</a> |
<a class="menulink" href="<%build_root_url%>/New">What's New</a> |
<a class="menulink" href="<%build_root_url%>/Cool">What's Cool</a> |
<a class="menulink" href="<%build_root_url%>/Ratings">Top Rated</a> |
<a class="menulink" href="<%db_cgi_url%>/jump.cgi?ID=random">Random Link</a> |
<a class="menulink" href="<%db_cgi_url%>/search.cgi">Search</a> |
</small></p>

That really is not necessary. Instead, in the Globals section of site_html_templates.pl (at the top), you could put something like:

Code:
$site_menu = qq~<p><small class="menu">|
<a class="menulink" href="$build_root_url">Home</a> |
<a class="menulink" href="$db_cgi_url/add.cgi">Add a Site</a> |
<a class="menulink" href="$db_cgi_url/modify.cgi">Modify a Site</a> |
<a class="menulink" href="$build_root_url/New">What's New</a> |
<a class="menulink" href="$build_root_url/Cool">What's Cool</a> |
<a class="menulink" href="$build_root_url/Ratings">Top Rated</a> |
<a class="menulink" href="$db_cgi_url/jump.cgi?ID=random">Random Link</a> |
<a class="menulink" href="$db_cgi_url/search.cgi">Search</a> |
</small></p>~;

Then include site_menu => $site_menu, in the %globals variable list and then use <%site_menu%> inside the template file where you want the menu to appear instead of the menu that is there now. That way, to change the menu, you only need to do it in one place. It doesn't require SSI at all nor .shtml files. You can do the same thing for a header and footer.

I hope this helps.


[This message has been edited by Bobsie (edited May 02, 1999).]
Quote Reply
Re: SSI and pages generated by cgi??? In reply to
Thanks Bobsie,

I'll give that a try sounds like what I'm trying to do with SSI but even better.

Regards . . . Scott

------------------
Boise Idaho's Online
Discussion Forum
www.tvweb-id.com


Quote Reply
Re: SSI and pages generated by cgi??? In reply to
Bobsie,

Is there a way to do this with the Keyword Display mods?

Just trying to figgure out how to use them with out a call to <!--exec blah blah blah-->
as my server does not support that Frown

Thanks
Babalon
Quote Reply
Re: SSI and pages generated by cgi??? In reply to
Babalon,

I have no idea. I have not downloaded nor installed the Keyword Display mod. Perhaps the author of that mod can help?
Quote Reply
Re: SSI and pages generated by cgi??? In reply to
Thanks anyway Bobsie... it was worth a shot Smile