In article <dm******************@news.abccom.bc.ca>,
dm*@bcgroup.net
(Dennis M. Straussfogel) wrote:
I'm trying to implement a nested SSI file that has in it the line:
<!--#include virtual="<!--#echo var='VAR_location'-->pagelinks.txt" -->
where VAR_location is a variable set in the "calling" file. (I.e., the
original file sets VAR_location equal to a directory path, then #includes
the file in which the above line appears). I can #echo the variable
correctly from the included file, and typing the directory path explicitly
in this #include generates the correct result, but the #include directive
as written above generates "[an error occured while processing this
directive]" error. I don't know much about scripting, so there might be
some really fundamental error in my syntax with the quotes, or something.
Anyone care to enlighten me? TIA.
Okay, I've answered my own question. For those more neophyte than me that
might be wondering, the solution is to set an new variable in the included
file
<!--#set var="pagelinks" value="pagelinks.txt" -->
then concatenate the two variables in the #include directive (and get rid
of the #echo altogether, which I suspected didn't make sense to begin
with)
<!--#include virtual="$VAR_location$pagelinks" -->
Viola! There is probably a very simple way that experienced scripters
would use to do the concatenation without defining a new variable, but
this works.
Dennis M. Straussfogel, Ph.D.
Aerospace Engineering Consultant