PDA

View Full Version : How to use a banner template on multiple pages..


djafactor
08-29-2002, 08:34 PM
Hi,

I'm new here. I'm trying to use a banner template that I can use for multiple pages of my site. I want to be able to link the template in to the various different pages so that if i ever edit the banner I would not have to edit it on all the pages of the site. i would also like to do this without the use of frames. I know I could do it with CGI but is there an easier way with HTML?

thanks a lot

Amit

x_goose_x
08-29-2002, 10:09 PM
Works in NS6:

<object type="text/html" width=100% height="250" data="source.htm">
</object>

Works in IE6:

<object type="text/x-scriptlet" width=100% height="250" data="source.htm">
</object>

Works in both:

<iframe src="source.htm" frameborder="0" width="300" height="300"></iframe>

duniyadnd
08-30-2002, 12:12 AM
easiest way i can think of is using server side includes.

difference here is that you don't save your files with a *.html extension, but a *.shtml extension.

Your host should support it, its pretty much standard with most hosts today (at least i hope so).

To bring in a file into a shtml file, you call it in like this:

<!--#include virtual="name_of_file" -->

OR

<!--#include file="name_of_file" -->

File indiciating the file at its location, virtual starting from the root directory (if it starts with a "/"). Recommended one to use is "virtual" instead of "file". In file, you cannot use ../ nor can it be an absolute path.

Hope that helped
Duniyadnd