Jump to content

Merging common block of HTML into multiple pages?


L.Adlon

Recommended Posts

Hi. I seem to remember reading about this method (or something along the lines of it) long ago, and I'm wondering if someone could refresh my memory (or correct me) by outlining how it might be done.

 

If you have a block of HTML code (...for example, a common interface that appears on multiple pages), I seem to remember there being a method of having that part as a separate HTML file, and then merging that into each of the other pages, rather than copying and pasting it into each one (and having to change all of them individually if something gets modified in that block).

 

Is that correct, and if so, how is that done?

 

 

Also, what is the compatibility of that these days? Are there any issues or considerations still remaining?

Link to comment
Share on other sites

Interesting... Thanks.

 

Ya, I'm not sure if that's the thing I saw years ago, but it certainly does what I'm after.

 

What's the compatibility status on that? I can't seem to find a support chart for that on my usual support chart page.

 

 

Is this something that people generally use (for common nav buttons, headers, footers, etc)... or do they still just write the code in each page?

Edited by L.Adlon
Link to comment
Share on other sites

php is commonly used and supported by Linux servers (non-windows) and is supported by all browsers. If you want to use ASP then you would need a Windows server but again the 'includes' is supported.

 

The thing you may be thinking about years ago is the .dwt template. It's much better to use PHP/ASP

Link to comment
Share on other sites

Yep, sounds like it'll do the job just fine. Pretty much all of the websites I've done have had a common header, nav buttons, footer, etc. I've been thinking of finally utilizing something like the php include to make it easier to do global changes.

 

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...