Forum Moderators: open

Message Too Old, No Replies

Html

inserting a template

         

fashezee

3:07 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a HTML page that will be displayed on top of every page throughtout my site.
What is the html code that includes other pages?

Thanks

Nick_W

3:15 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Frames [w3schools.com]

Nick

andreasfriedrich

3:25 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might want to include this HTML code on the server using either SSI or some server side scripting language like PHP or Perl.

Spiders do not like frames.

Andreas

fashezee

3:48 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know of frames but I do not wish to use them.

What I am looking for is something like:

<INCLUDE src="mypage.html>

I would like to know whether if there is a tag in HTML that would allow me to do this?

edit_g

3:57 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There isn't an Html tag that will let you do it (not that I know of anyhow). You can do a server side include with Php, asp, Coldfusion etc... It would look something like that.

Dreamweaver will let you do a template like this- if you have DW search for templates in help.

BlobFisk

3:58 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will need to use a server-side language that understands SSI's, like PHP, ASP or SHTML. The code then is:

<!--#include file="file.inc" -->

You need to use the .inc extention, .txt or .asp etc. will also work. You can also use a virtual include:

<!--#include virtual="file.inc" -->

Some more info here [4guysfromrolla.com] and here [hoohoo.ncsa.uiuc.edu] on this.

andreasfriedrich

4:59 pm on Nov 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will need to use a server-side language that understands SSI's, like PHP, ASP or SHTML.

Just to clear this up a bit: Server Side Includes or SSI for short usually refer to the serverīs processing of specially formated SGML comments. See the documentation for Apacheīsmod_include [httpd.apache.org] module. .shtml is just an extension that is usually handled by mod_include. But this will depend entirely on you server configuration.

Server-side scripting languages may have some function to include an external file as well. This depends entirely on the languageīs syntax and is usually not referred to as SSI. In PHP you may use include/include_once or require/require_once, in Perl you can use use, do, require.

Andreas