Closed Thread Icon

Preserved Topic: headers and footers (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20878" title="Pages that link to Preserved Topic: headers and footers (Page 1 of 1)" rel="nofollow" >Preserved Topic: headers and footers <span class="small">(Page 1 of 1)</span>\

 
butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 03-28-2001 23:34

Could any of you give me some links to stuff about using headers and footers. I hear a lot of you talk about using them, but I'm not quite sure what they are or how to use them. All explinations are welcome also.

Thanks

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 03-29-2001 04:40

You might ask over at the gurusnetwork. I believe they use SSI statements to call standard headers and footers:

<!--#include virtual="chunk_o_code.txt" -->
will call a text file and plug it's contents into your file in the exact spot where that call is, that is, just replacing everything from angle bracket to angle bracket with the contents of the called .txt file, on the server.

You won't see any difference from viewing the source code at GN but if you nose around the associates area or author info you might dig up some clues.

<whoops>

[This message has been edited by JKMabry (edited 03-29-2001).]

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 03-29-2001 04:44

Well there are a lot of different things.

I think what you are refering to is template designs. This is to create different files to include in a web page. This way you do not have to keep repeting code that is used on multiple pages.

example page.

<html>
<head>
<title> My Website</title>
<body>
<h1> This is My Website</h1>
<p> This is a Hello World page. </p>
</body>
</html>

Then I would make a header (head.html) file that would contain

<html>
<head>
<title> My Website </title>
<body>
<h1> This is my Web Site </h1>

and I would make a foot page foot.html

</body>
</html>

Then I would use SSI to include the files via.

<!--#include file="head.html"-->

<p> This is a Hello World page </p>

<!--#include file="foot.html"-->

And that can save you a lot of time. This is just a simple example, but there is much more that can be done. It is a very powerful tool which can save you a ton of time.

SSI is not the only way that this can be done, you can use a variety of other coding languages to do this, it is a server side thing, and not a client side thing, so Javascript is not able to do this, but SSI, PHP, PERL, JAVA, and ASP for starters all have methods of achomplishing this.

It is a great tool that should be learned. And most times I will recommend using virtual in place of file in the SSI call, FYI.

-mage-

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 03-29-2001 08:27

Actually, you can do it with Javascript too, not as reliable, but it works.
I used it for the navigation on my site before I got access to php.
Take a look here: http://www.dmsproject.com/article.php3

However, it you can use SSI/PHP/ASP/JSP on your site, go with that!
Dan


WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 03-29-2001 15:50

Ok, I see how the JS works, nice and simple, I like it.

IIS however is not the only server which supports SSI however, it is the only that supports ASP, but the IIS does not have access to XSSI which is so much more powerful that SSI alone.

I truely recommend unix/linux apache solutions, because they are much faster than the IIS IMO, only the benchmarks can tell for certain.

-mage-

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 03-29-2001 20:42

Could I use this on existing web pages?

<!--#include file="head.html"-->

<p> This is a Hello World page </p>

<!--#include file="foot.html"-->

Or would they have to be completely redone in PHP, or whatever?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-29-2001 21:36

Yes, you can use SSI on existing web pages, you'll only have to change their extension to .shtml (or to something else if your web server is configured differently)...

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 03-29-2001 22:01

You can not however parse for SSI and parse for PHP. It just doesn't work, if the page uses PHP and you want to include content you would need to use something like:

<? include('http://yourweb.com/head.html'); ?>

Content

<? include('http://yourweb.com/foot.html');?>

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 03-29-2001 22:31

Very cool guys.

Thanks

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 04-03-2001 11:43

WarMage, this little tut was written back in -98 when I didn't know "as much" as I do now...
As I redo the site, I'll go over the content as well.
Good reminder for me though.Dan

« BackwardsOnwards »

Show Forum Drop Down Menu