Reply
Need Help With SSI's - Please!!
Old 10-26-2005, 01:26 PM Need Help With SSI's - Please!!
Ultra Talker

Posts: 255
Location: NY
Hello all,
I've recently redone my website (it's not uploaded yet though) and find that the amount of pages are growing. The problem I notice that I will have in the very near future is the fact that my navigation menu's will be ever-changing...so I figure I'd be better off in using an SSI within the pages so that I can keep editing to a minimum. Basically, I'd like to get the navmenu, and the footer included within an SSI. For right now, I want to concentrate on the navigation menu (navmenu).

I've come across some information and would like someone to verify that it's correct. I'd like someone that has used SSI within their own website so I can see some examples and how you did it or, perhaps explain in VERY simple terms how it's done. I *really* need to see the coding.

This is how I interpreted how to utilize SSI within my webpages from info I've read:

1. Add the following line within my .htaccess file

AddType text/x-server-parsed-html .html .htm

2. Make another text file (in my case my navmenu) that I want seen in all the webpages. (This would include all the html code for my navmenu.) I would name it navmenu.txt.

3. Add this line of text within my actual web page in the area where the navmenu is to appear:

<!--#include file="navmenu.txt"--> (no spaces between, right?)

4. Upload all the files to the server.

Is this all there is to it? I haven't tested it yet, but wanted to make sure I'm doing it correctly before I go and spend time on testing it.

I also read quite a few articles on having to change all the files to an .shtml extension, but I really don't want to have to do that.

Thanks a heap,
DianeD
DianeD is offline
Reply With Quote
View Public Profile Visit DianeD's homepage!
 
When You Register, These Ads Go Away!
Old 10-26-2005, 02:12 PM
chrishirst's Avatar
Super Moderator

Posts: 13,626
Location: Blackpool. UK
the .htaccess lines should be

Code:
AddType text/html .html .shtml
AddHandler server-parsed .html .shtml
Options Indexes FollowSymLinks Includes
(You can of course add .htm into the AddType and AddHandler lines).


the include line will work provided you have a flat site structure (all files at the same level) if you have sub-folders that your navigation has to work in you will need to use

HTML Code:
<!--#include virtual="/navmenu.txt"-->
more here
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Need Help With SSI's - Please!!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12943 seconds with 12 queries