PDA

View Full Version : Is .shtml nesessary when using includes with Dreamweaver?



tomrogers
01-27-2008, 06:47 PM
After 4 years using FrontPage, I've made the move to Dreamweaver CS3. I'm working on a new website, the test page for it is currently at http://www.hwedfund.org/index.shtml. All the websites I've created so far with FrontPage are template based and use includes for the navigation system. I want to do the same thing with Dreamweaver, and at first blush it seems that it will only work with serverside includes. What I get from the help menu is that in order to work I have to use the extension .shtml. I was hoping to just use .htm, or at worst .html. Is .shtml really necessary? Is there a way I can do it and have .htm as an extension?

Another thing I just learned about is a tool called "library items" which sounds like an include to me, but I have not experimented with it yet.

I know there are a lot of WestHosters using Dreamweaver, what would you suggest is the best route for me to take?

tomrogers
01-28-2008, 09:33 AM
I got some good advice in the Dreamweaver forum. In response to the question "Is .shtml really necessary?", I got the following reply:

If you are using ordinary HTML includes, then your pages must be named with an *.shtm(l), or *.asp file extension (provided your host is Windows in the latter case). The only exception to this rule is if you can persuade your host to enable 'file parsing' so that all filename extensions are parsed by the server for include directives. In this case, you can name your files with ordinary *.htm(l) extension.

I worked with Mark here at tech support who showed me how to make a change to the Apache configuration file (/etc/httpd/conf/httpd.conf) and added html and htm to this list. Before the change, the file read:

# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

#

It has now been changed to read:

# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml .html .htm

#

I tested it out by changing my includes file and the test page use .htm and it works!