[Xitami] Server side includes and directory listing templates

Francis Turner xitami@lists.xitami.org
Tue, 04 Dec 2001 15:45:25 +0100


Michael Pierce wrote:

>Hello,
>   In my directory listing template "myhttpdir.gsl" I would like to run have
>a server side
>that runs a ".exe" on each file with a certain extension. The following
>code:
>.    if defined (type)
>.       if type = "lnk"
>.           <!-- #include virtual="/cgi-bin/resolvelnk.exe" -->
>.       endif
>.endif
>
>Does not run the "resolvelnk" executable.
>.           <!-- #include virtual="/cgi-bin/resolvelnk.exe" -->
>
This line does not do what you want it to do.
.           <!-- #include virtual="/cgi-bin/resolvelnk.exe" -->

Firstly it should give an error because <!-- is not a recognised gsl command 

Then if you were to remove the leading . it might at least give a page 
with the cgi-bin line in it but I don't think it would execute it as it 
would be treated as a static html page not a dynamic shtml one.

What you need to do - which is tricky - is to use commands like .literal 
or .xml to load the text and the mangle it but I'm not sure you can do 
what you would want to do (assign a variable to the file contents which 
you would then manipulate with substr)...

Francis

-- 
"Education is when you read the fine print; 
  experience is what you get when you don't." Pete Seeger