Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

# include question

Status
Not open for further replies.

googleman

Programmer
Aug 28, 2003
5
IE
Hi there,

Was just wondering if you could sort me out with this prob please...I want the left nav (leftnav.shtml> to be included in every page in my folder but it will not appear...where am I going wrong please??

leftnav.shtml

<table border=0>
<td bgcolor=&quot;#CCCCEE&quot;><span class=&quot;sub&quot;><b>Menu</b></span></td>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;index1.htm&quot;>Home<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;intro.htm&quot;>Introduction<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;risk1.htm&quot;>Risk Assessment<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;act1.htm&quot; >Activation<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;team1.htm&quot; >Teams<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;append1.htm&quot; >Appendices<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;proced1.htm&quot; >Procedures<br></a></td>
</tr>
<tr>
<td bgcolor=&quot;#AAAACC&quot;><a href=&quot;help2.htm&quot;>Help</a></td>
</tr>
</table>

1 of my pages intro.htm

<html>
<head>

<!-- This file contains the template which will be displayed on each page -->
<LINK REL=StyleSheet HREF=&quot;stylesheet.css&quot; TYPE=&quot;text/css&quot;>
</head>

<body leftmargin=&quot;0&quot; topmargin=&quot;0&quot; bottommargin=&quot;0&quot; rightmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<table width=&quot;733&quot; height=&quot;491&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;>
<tr bgcolor=&quot;#A8CCCC&quot; >

<!-- Inserts the GroupIT logo on the LHS of the page -->
<td width=&quot;182&quot; align=&quot;left&quot; height=&quot;79&quot;>
<img src=&quot;logo.gif&quot; width=&quot;160&quot; height=&quot;84&quot;>&nbsp;</td>

<!-- Inserts the PTSB logo on the RHS of the page -->
<td valign=&quot;top&quot; align=&quot;right&quot; height=&quot;79&quot; width=&quot;547&quot;>
<img src=&quot;logo2.gif&quot; width=&quot;122&quot; height=&quot;57&quot; >&nbsp;</td>
</tr>
<tr height=&quot;100%&quot;>
<td width=&quot;182&quot; valign=&quot;top&quot; bgcolor=&quot;#A8CCCC&quot; height=&quot;412&quot;>
&nbsp;



<!-- Places Left nav file here. Left nav is stored in leftnav.shtml. Use include
Leftnav.shtml will be a file that contains a table with the nav links. -->
<!--sets the LHS menu selection-->

<!--#include file=&quot;leftnav.shtml&quot;-->

</td>

<td valign=&quot;top&quot; height=&quot;412&quot; width=&quot;547&quot;>
<!-- This is the main content area. all the content files will be includes. The content will be in tables -->
<table cellspacing=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;15&quot; border=&quot;0&quot; height=&quot;56&quot;>
<tr>
<td valign=&quot;top&quot; height=&quot;26&quot;>
<!----------------------------------------------------------------------------------------->
<!-- Contains the contents of the page -->



<!----------------------------------------------------------------------------------------->

Please show me what I am doing wrong....thank you so much:)
 
Rather than <!--- include file= try this: <!--- include virtual=.



There's always a better way. The fun is trying to find it!
 
Hi mate,

You have the whole situation the wrong way round.

Rename your intro.htm to intro.shtml and leftnav.shtml to leftnav.htm, then update the reference in the include to point to the new named file.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Just to clarify on my last post.

shtml is the most common used extension for SSI. The actual page with the includes needs to be shtml. Any includes you make should not be shtml unless you have SSI statements within the included page.

If you name all of your includes shtml, then the server will parse every one of them for SSI statements every single time, because it doesn't know if they have SSI in them until it parses them. When you start getting into a high number of hits, this can cause a performace hit.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top