View Full Version : Question on nesting SSI directives

07-27-2003, 06:13 PM
Can anyone tell me how to nest SSI directives, such as including the value of a query string inside of an include directive?

07-27-2003, 06:47 PM
What server side language are you using?

07-27-2003, 10:09 PM
I was just talking about simple (X)SSI. I found out that it could be done with with <!--#include virtual="dir/$QUERY_STRING.ext" -->. Haven't been able to figure out how to include one directive inside another though.

07-29-2003, 12:42 AM
Your use of 'include one directive inside of another' seems a little confusing...what specifically are you trying to do?

Can you accomplish it by using xSSI if-elif-else statements?

Take a look around here: http://www.uic.edu/depts/scailab/system/tutorial.shtml

08-03-2003, 06:34 AM
Basically I was just trying to get the query string from a URL and add that value to the attribute in an include directive. As I said I found a satisfactory solution for now, but before I was wondering if it would be possible to do something like <!--#include virtual="dir/<!--#echo var="QUERY_STRING" -->" --> That didn't work though, and all I was just wondering if something like that was possible.

08-04-2003, 12:49 PM
i was asking what language you are using cause in ASP, it's not possible since the parcing starts with including the SSI's code before checking the control of flow (if -then-else-end if etc), and then just starts with parsing the actual code. So a dynamic filename where you need to get a value from the querystring isn't possible in ASP) I assume the same goes for other server side languages, but i'm not sure.