Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Using SSI within links templates -- possible?

Quote Reply
Using SSI within links templates -- possible?
Hi all,

IF possible, I would like to include an SSI call within one of my links templates. For instance,



Now, I know that when the pages are created, they are done so dynamically such that templates are read. SO if I put the above tag in, it will probably just come up as text or will be hidden.

Now, my question is: is there any way to have SSI tags executed while pages are built?

I'm doubting so, but no harm in asking.

Thanks again!

Quote Reply
Re: Using SSI within links templates -- possible? In reply to
If you use <%include file.txt%> it will be included when you build your pages.

I think this doesn't work if you have dynamic pages (using page.cgi)

Quote Reply
Re: Using SSI within links templates -- possible? In reply to
Yeah, the <%include file.txt%> tag will only read text -- if I do <%include file.cgi%>, the script will simply be read. I need to know if I can actually do something like
<!--#exec cgi="path/to/file.cgi" --> so I can execute a script within the template.

Possible?

Quote Reply
Re: Using SSI within links templates -- possible? In reply to
I don't think it's possible using dynamic pages.

What you could do, is build the templates with the directive, and since built pages are treated as "static" ones, there should not be any problem executing the script.

Quote Reply
Re: Using SSI within links templates -- possible? In reply to
I don't think I fully understand this... what exactly do you mean?

Thanks.

Quote Reply
Re: Using SSI within links templates -- possible? In reply to
OK... you insert the SSI Exec tag in your home.html . When you build pages (nph-build.cgi) the SSI tag is not parsed, but it is left "as-is" in your built index.html .
When you open the index.html page with your browser, the server WILL process the SSI tag.

If I'm still not clear enough, please let me know.