Jump to content
L.Adlon

Merging common block of HTML into multiple pages?

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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...