Forum Moderators: open

Message Too Old, No Replies

External html

         

JMScomp

11:11 pm on Feb 6, 2006 (gmt 0)

10+ Year Member



I've heard that you can have external html documents for webpages (like css stylesheets). Is this true? If so how do you go about making one, and then calling it up within a page.

Kyle

Dijkgraaf

11:52 pm on Feb 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes
Either via Server Side Includes (SSI for short), or having dynamically generated pages that include other files when generating the page.

JMScomp

4:47 pm on Feb 7, 2006 (gmt 0)

10+ Year Member



Can you use one to have an external html menu that can be called up on all pages?

Kyle

ErolinDesigns

4:52 pm on Feb 7, 2006 (gmt 0)

10+ Year Member



Yes. Create a menu.html file and create your menu. Then wherever you want to include it, add the following code:

<!--#include virtual="/menu.html" -->

JMScomp

4:59 pm on Feb 7, 2006 (gmt 0)

10+ Year Member



Do you have to have the standard tags <html>, <head> and <body> in the external file, or do you just copy and paste the code snippet?

Kyle

encyclo

8:11 pm on Feb 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are using SSI, then you just use the snippet of markup you want to include without anything else. Bear in mind that some servers require an .shtml extension for SSI to function, unless you specify that .htm or .html files are parsed for includes in a .htaccess file.

JMScomp

9:06 pm on Feb 7, 2006 (gmt 0)

10+ Year Member



The Server doesn't support SSI, but what about the dynamically generated page. Is that Java or what?

Kyle
P.S. Sorry, I've never had this sort of issue before.

Dijkgraaf

9:23 pm on Feb 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Java, PHP, ASP or whatever you have available.

JMScomp

9:29 pm on Feb 7, 2006 (gmt 0)

10+ Year Member



Ok, thanks for the info.

Kyle

mehh

4:52 pm on Feb 12, 2006 (gmt 0)

10+ Year Member



you could always use the <frame> and <frameset> tags