Reading html from another document

admin

Administrator
Staff member
:rocker:<br />
Ok, this is hard 2 explain, but I will try!<br />
<br />
On my web page, each page has a header, the header is pretty big, so I want to be able to put it into a file, which is then called upon from the page I want to put it on, so that its just like I had the header there all along, but its stored in a different file.<br />
<br />
there, If anyone can help me, I will be VERY gratefull!<br />
:rocker:<br />
Home page below<!--content-->I believe you do this using SSI (Server-Side Include). I don't know enough about this to tell you exactly how to do it but hopefully someone else here can.<!--content-->It's not hard to do really, you just have to have a host that supports server-side includes.<br />
<br />
These could be the steps you could take:<br />
1. Create the page you want to include in other pages and name it eg navigation.html<br />
2. Create the page where you want to include navigation.html, and where you want that to appear you put the following: <br />
<!--#include file="navigation.html" --><br />
and save this newly created page as a parsable file (.asp, .php, .shtml, depending on your webspace possibilities)<br />
3. In all the other pages where you want to include navigation.html, just repeat step 2<br />
<br />
This way, if you would change your navigation.htlm file, it would be updated in all pages dynamically on the server.<br />
<br />
I have a site set up with four includes: left navigation, right navigation, footer and header. Just four files to update, and I can change almost everything in my site.<br />
<br />
Hope this helps.<!--content-->
 
Back
Top