Gossamer Forum
Home : Products : Gossamer Links : Discussions :

function-tags as SSI?

Quote Reply
function-tags as SSI?
Would a sub{} tag in the template parser do more or less what an SSI call would do? emb_perl can be an SSI replacement, and the function-tags are similar to emb_perl.

So, if you needed to call an SSI tag, couldn't you rewrite it as a function-tag within the globals.txt file?

You'd either have to rewrite it as a function call, or use system() to process the external script, but it should work, right?

If this is true, would there then be a way to "wrap" SSI calls inside a function-tag, so that people using existing SSI calls, can easily move them over to simple <%tag%> that would run from inside a .cgi generated page as well as a statically served .html/.shtml page?

Just wondering.

PUGDOG®
PUGDOG® Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: function-tags as SSI? In reply to
Hi,

Yes, definately. However typically if you are in a perl script, instead of using system() to run another perl script (say to generate a banner ad), it is much more efficent to require/use the code as it saves a fork and new perl process.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: function-tags as SSI? In reply to
Could you explain a little more on how to do this...Thanks!

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: function-tags as SSI? In reply to
Hi,

Well, webadverts has instructions on how to do it, I'm not sure about adcycle. Basically it's:

require '/path/to/somefile';
my $banner = &somefunc( args );
print $banner;

This saves you from starting a new perl process to generate the banner and you do it all in your own code.

Cheers,

Alex

--
Gossamer Threads Inc.