Gossamer Forum
Home : Products : Links 2.0 : Customization :

CGI from CGI

Quote Reply
CGI from CGI
Hey all,

I was wondering if it was possible to run a CGI from the output of another one.

Basically, I would like to run header, menu and footer cgi's from templates such as add.html (now modified to add.shtml)

Is it possible, or would I have to modify add.cgi and the like??

Ta muchly

Your friendly cloth cat
Quote Reply
Re: CGI from CGI In reply to
CGI from within CGI no possiblo... results in big security problem, and so is disallowed. I know of four solutions...

The easiest solution is to install the Enhanced template mod and then <%include yourfile%>.

You can also <!--#include virtual="/yourfile" -->, which works with varying degrees of success depending upon your server (might require .shtm extension, mine does not).

You can also set-up global variables within site_html_templates which you would call in your templates like <%header%> and <%footer%>.

Finally, you can also require the other CGI perl script, making sure that the subs do not name conflict, and then &header_sub in the reelvant sections of your site_html_templates.

The Immuatable Order of Modding
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: CGI from CGI In reply to
There is a FAQ in the Resource Center that discusses the second option that oldmoney provided.



Eliot Lee
Anthro TECH,L.L.C