Server Side Includes

liunx

Guest
Is it possible to insert an ssi with variables? If so, how? I have a template that I'm using were I want to change the navigation, based on where the page is located on the site. I am using ssi's but so far have not been able to pass variables to the include. For example:<br />
<br />
<!--include file="ABCNavigation.htm"--><br />
<!--include file="DEFNavigation.htm"--><br />
<br />
I'd like to use <br />
<br />
Navigation=ABCNavigation.htm<br />
<!--include file=$Navigation--><br />
<br />
however, <script> does not support this. How can I pass a varible to an include?<!--content-->you can use php.<br />
<br />
<br />
<?php<br />
<br />
$navigation = "abcnavigation.html";<br />
include [$navigation]; ?><br />
<br />
<br />
<br />
<br />
<?php<br />
<br />
$navigation = "abcnavigation.html";<br />
include "[$navigation]"; ?><br />
<br />
<br />
<br />
try either one of those.<!--content-->Thanks. It's working<!--content-->why are you passing a vairble w/ an include though? Isn't there an easier way, such as a query string, or just storeing it in a data base or using a session variable? What are you trying to accomplish though the use of an include?<!--content-->
 
Back
Top