Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Remus

macrumors member
Original poster
I need help with a web page my wife and I are working on. My wife is more of an HTML expert than I. We are tring to develop a site on our .mac homepage that has several pages. We would like to have the same menu on each page. We tried to use the HTML include command, but it does not seem to work. The fromat that we use is <!--#include file="included.html" -->. Where "included file is at the same level as the pages...

Is there an easier way to do this or are we missing something.....


Thanks for any help.
 
There is several options to consider:

1. Use frames, if you dare. I don't personally recommend it

2. If you use GoLive or Dreamweaver, you can create a navigation bar complete with graphics, and crumb trail, etc. that are a sinch to make.

3. I am away from HTML books right now, so I can't tell you for sure, but you can use a div tag that you copy-paste from page to page. To find resources and examples go to W3C .
 
It sounds like frames would work for you. Personally, that is the method I use to create a menu that is the same for the whole site. On the other hand I haven't tried any of the other methods mentioned above, so I can't offer a comparison. Frames seem to work well for me, so I stick to them.

If you need any help setting up frames, let me know.
 
Not sure if you are aware of it, but include is a SSI directive which the web server has to be enabled to interpret and told that SSI exists for your site.

Apple may not have SSI enabled for .mac. Before making any changes to your site, I would suggest contacting Apple tech support to confirm you can use SSI directives.

If SSI is enabled, you probably have to tell the server to process SSI for your site. The normal way to do that is create a file named .htaccess and in that file put the lines:

Options Includes
AddHandler server-parsed .shtml
AddType text/html .shtml

You need to upload the .htaccess file with your other site files. You also need to rename your .html to .shtml so the server knows to look for SSI directives in the file.

Good luck.
 
gbojim summed it up.

if .mac supports php, asp etc, they have include commands you can use too....
 
Originally posted by gbojim

If SSI is enabled, you probably have to tell the server to process SSI for your site. The normal way to do that is create a file named .htaccess and in that file put the lines:

Options Includes
AddHandler server-parsed .shtml
AddType text/html .shtml

You need to upload the .htaccess file with your other site files. You also need to rename your .html to .shtml so the server knows to look for SSI directives in the file.

Good luck.

I can not create a file with "." as the first character. How do I do that.

Also I sent an E-Mail to the Apple HomePage Support, but after I submitted the request I was sent to a page that said that this was only for comments and not for help. I will look over at Apple's web site again to see if I can get more help there...

I appreciate all the help you (all of you) have given. I will keep you posted...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.