943,779 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Feb 25th, 2004
0

footer and nav include

Expand Post »
I used to know how to do this but it seems as though time and new programming has passed me by. I just want to include a simple web page for a left nav bar and one for a footer. In Dreamweaver I use <!--#include file="includes/leftnav.htm" --> and it shows up in the preview but when I put the page on my host (tested on two hosts) and locally just opening the index.htm through my computer the inclues are not there. I also tried <include src="file.htm"> but that didn't work in either DW or explorer.

PLEASE can anyone help out. I just want this site as simple as possible but I don't want to have to deal with pasting the nav and footer on each page.

Thanks,
TMP
Reputation Points: 10
Solved Threads: 1
Newbie Poster
TMPAdmin is offline Offline
3 posts
since Dec 2003
Feb 25th, 2004
0

Re: footer and nav include

What if anything are you programming in? If your using just html you should really brush up on your skills
Team Colleague
Reputation Points: 96
Solved Threads: 21
The Geek Father
Zachery is offline Offline
781 posts
since Nov 2003
Feb 25th, 2004
0

Re: footer and nav include

What you are doing by including files is called SSI, server side includes. Normally files which use SSI have an *.shtml extension but sometimes an *.html extension is supported as well.

SSI, as its name suggests, is performed server-side. Therefore, the server hosting the files needs to support it. Apparently the remote hosts you are using support SSI but your local computer does not, and therefore it won't work locally. That's okay - just upload the files and it should all work.

It's similar to how a web dev language such as PHP operates. You can't execute PHP code locally without installing Apache or the like on your home machine.

If you wish to be able to test SSI out locally, install the Apache server (windows version) on your home machine. Otherwise, create a folder no one knows about on your remote host to do testing
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Feb 25th, 2004
0

Re: footer and nav include

Hmmm, you could download, install Apache, spend three hours poking it until it works, then setup PHP, go back to poking Apache, and learn how to do some absic PHP scripting, and persuade your host to install it.... or you could do this:

HTML and CSS Syntax (Toggle Plain Text)
  1. <script type="text/html" src="header.htm"></script>
  2. and
  3. <script type="text/html" src="footer.htm"></script>
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003
Feb 25th, 2004
0

Re: footer and nav include

Quote originally posted by Roberdin ...
Hmmm, you could download, install Apache, spend three hours poking it until it works, then setup PHP, go back to poking Apache, and learn how to do some absic PHP scripting, and persuade your host to install it.... or you could do this:

HTML and CSS Syntax (Toggle Plain Text)
  1. <script type="text/html" src="header.htm"></script>
  2. and
  3. <script type="text/html" src="footer.htm"></script>
That only applies when including JavaScript/VBScript, not HTML files. He'd have to output his HTML using JavaScript to make that work. I wish it worked though, because that would definitely come in useful!
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
Feb 28th, 2004
0

Re: footer and nav include

Does your remote host support php?
Reputation Points: 12
Solved Threads: 3
Posting Whiz in Training
rixius is offline Offline
212 posts
since Nov 2003
Mar 1st, 2004
0

Re: footer and nav include

www.w3c.org has great information about xhtml and ssi
you could also rename your pages to .php and include it using php

<?php include ... ?>

www.php.net function search: include
Reputation Points: 115
Solved Threads: 2
Junior Poster
floris is offline Offline
152 posts
since Jan 2004
Mar 1st, 2004
0

Re: footer and nav include

Hey floris, welcome back - long time no see

But that goes right back to the original problem ... his local computer won't execute PHP scripts
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Mar 2nd, 2004
0

Re: footer and nav include

look at that guy above me, avatar. :rolleyes:
Reputation Points: 10
Solved Threads: 0
Newbie Poster
crc3577 is offline Offline
2 posts
since Mar 2004
Mar 4th, 2004
0

Re: footer and nav include

Quote originally posted by Roberdin ...
Hmmm, you could download, install Apache, spend three hours poking it until it works, then setup PHP, go back to poking Apache, and learn how to do some absic PHP scripting[/code]
or you could do it the easy way and follow this tutorial Installing Apache, PHP, and MySQL under Windows
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Ragnarok is offline Offline
94 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: iframes help
Next Thread in HTML and CSS Forum Timeline: Making a random playlist?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC