jonni
09-03-2008, 10:35 AM
I run Apache2.x and Mozilla on my own system for developing simple websites for guesthouses/businesses in the west of ireland. SSI is a great tool for diminishing workload and organising web-pages logically. The following is an example of what I have written and tested sucessfully on my own system
body of home.shtml
<body class="bg">
<center>
<!--#set var="page" value="home" -->
<!--#include virtual="common/main.shtml" --><br>
</center>
</body>
file common/main.shtml
<!--main 3(rows)x3(columns) table-->
<table class="general" border="2" align="center" width="96%" bgcolor="#0000ff">
<tr align="center">
<td width="200"><img src="gallery/mg_logo.jpg" width="200" height="150" border="0">
</td>
<td colspan="2">
<!--2x4 navigational table-->
<table class="general" border="2" align="center" width="96%">
<tr align="center">
<!--#if expr="$page = home" -->
<!--#include virtual="../home/nav.html" -->
<!--#elif expr="$page = directions" -->
<!--#include virtual="../directions/nav.html" -->
<!--#elif expr="$page = see_do" -->
<!--#include virtual="../seeanddo/nav.html" -->
<!--#elif expr="$page = booking" -->
<!--#include virtual="../bookingform/nav.html" -->
<!--#elif expr="$page = thankyou" -->
<!--#include virtual="../bookingform/nav.html" -->
<!--#endif-->
</tr>
<tr align="center">
<td><a class="nav" href="home.shtml">Home</a></td>
<td><a class="nav" href="directions.shtml">Directions</a></td>
<td><a class="nav" href="see_do.shtml">See and Do</a></td>
<td><a class="nav" href="booking.shtml">Booking Form</a></td>
</tr>
</table>
<!--end of 2x4 navigational table-->
</td>
</tr>
file ../home/nav.html
<!--navigation at home-->
<td><img src="gallery/button_1active.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_2.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_3.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_4.gif" width="150" height="100" border="0"></td>
<!--end of navigation at home-->
as I said it all works fine on my own system but after loading it on to futurequest the resulting code in the browser is this
<body class="bg">
<center>
<!--#set var="page" value="home" -->
<!--main 3(rows)x3(columns) table-->
<table class="general" border="2" align="center" width="96%" bgcolor="#0000ff">
<tr align="center">
<td width="200"><img src="gallery/mg_logo.jpg" width="200" height="150" border="0">
</td>
<td colspan="2">
<!--2x4 navigational table-->
<table class="general" border="2" align="center" width="96%">
<tr align="center">
<!--navigation at home-->
<td><img src="gallery/button_1active.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_2.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_3.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_4.gif" width="150" height="100" border="0"></td>
<!--end of navigation at home-->
something like that, in other words it doesn't recognise if,elif, endif it doesn't parse beyond nested includes, all in all its a total waste of time, maybe I'm missing something small, anyone???
body of home.shtml
<body class="bg">
<center>
<!--#set var="page" value="home" -->
<!--#include virtual="common/main.shtml" --><br>
</center>
</body>
file common/main.shtml
<!--main 3(rows)x3(columns) table-->
<table class="general" border="2" align="center" width="96%" bgcolor="#0000ff">
<tr align="center">
<td width="200"><img src="gallery/mg_logo.jpg" width="200" height="150" border="0">
</td>
<td colspan="2">
<!--2x4 navigational table-->
<table class="general" border="2" align="center" width="96%">
<tr align="center">
<!--#if expr="$page = home" -->
<!--#include virtual="../home/nav.html" -->
<!--#elif expr="$page = directions" -->
<!--#include virtual="../directions/nav.html" -->
<!--#elif expr="$page = see_do" -->
<!--#include virtual="../seeanddo/nav.html" -->
<!--#elif expr="$page = booking" -->
<!--#include virtual="../bookingform/nav.html" -->
<!--#elif expr="$page = thankyou" -->
<!--#include virtual="../bookingform/nav.html" -->
<!--#endif-->
</tr>
<tr align="center">
<td><a class="nav" href="home.shtml">Home</a></td>
<td><a class="nav" href="directions.shtml">Directions</a></td>
<td><a class="nav" href="see_do.shtml">See and Do</a></td>
<td><a class="nav" href="booking.shtml">Booking Form</a></td>
</tr>
</table>
<!--end of 2x4 navigational table-->
</td>
</tr>
file ../home/nav.html
<!--navigation at home-->
<td><img src="gallery/button_1active.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_2.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_3.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_4.gif" width="150" height="100" border="0"></td>
<!--end of navigation at home-->
as I said it all works fine on my own system but after loading it on to futurequest the resulting code in the browser is this
<body class="bg">
<center>
<!--#set var="page" value="home" -->
<!--main 3(rows)x3(columns) table-->
<table class="general" border="2" align="center" width="96%" bgcolor="#0000ff">
<tr align="center">
<td width="200"><img src="gallery/mg_logo.jpg" width="200" height="150" border="0">
</td>
<td colspan="2">
<!--2x4 navigational table-->
<table class="general" border="2" align="center" width="96%">
<tr align="center">
<!--navigation at home-->
<td><img src="gallery/button_1active.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_2.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_3.gif" width="150" height="100" border="0"></td>
<td><img src="gallery/button_4.gif" width="150" height="100" border="0"></td>
<!--end of navigation at home-->
something like that, in other words it doesn't recognise if,elif, endif it doesn't parse beyond nested includes, all in all its a total waste of time, maybe I'm missing something small, anyone???