Dreamweaver MX Tutorial To Create Jump Menus
In this Tutorial you will learn how to use the Macromedia Dreamweaver Behaviors Panel to create Jump Menus...
Read More

Pop-Up Menus
In this Tutorial you'll learn how to use the Dreamweaver behaviors panel to create small pop-up menus. This behavior helps to create drop-down menus...
Read More

Server Side Includes (SSI)

HTML Editor: Any
Recommended: Macromedia Dreamweaver 8


What are Server Side Includes?

Server Side Includes are files that have some commonly used code that can be reused by many pages in your site. When you use a SSI file the server takes the entire content of the file and inserts it into the page, replacing the include code. As an example, imagine you have a large portal web site with links at the top, bottom and sides common to all pages (or a section of pages). To make the site easy to maintain you can have the header, footer, right menu and/or left menu as include files. So when there is a change to be made you just need to make the changes, save and upload the corresponding include file and not the many files using it.

How are Server Side Includes better and different from frames?

Though frames are sort of similar to Server Side Include files, we do not recommend their use as not all browsers support them. In frames each frame is a seperate page with its own <html><head><body> tags (unlike SSI where they cannot have these tags) and is called in the main page where the frames are defined. Gary Winnick

Create your own SSI file and call it by using the given code
  • Create a file which contains the reusable code with the extension .htm, .html, .asp or .php
    Very Important: If you are using highly confidential ASP/PHP code (or any other web technology), like your database connection string or some business logic, in your include file then make sure the include file is named .asp/.php so that no one can open the include file and see your code.

  • You cannot use include files in HTM or HTML files, You can use them only in SHTML, ASP, PHP pages, etc. - that support include files.

  • Now go to the page that will use the include and add the following code in the appropriate place:
    SHTML or ASP: <!--#include virtual="/path_relative_to_site" -->
    PHP: <?php include("../path_relative_to_document") ?>
Calling Server Side Includes into your page using Macromedia Dreamweaver

In your page, keeping your cursor in the place where the include file should come, Click on Insert > HTML > Script Objects > Server Side Includes (for MX 2004) or Insert > Server Side Includes (for Dreamweaver 4). In the pop-up window that appears select your include file, give the path as relative to Site Root (for ASP) and click OK.


Partner Directory
Resources 1 2 3 4 5

Business
>> 1 2 3 4 5 6 7 8 9 10 11 12
Computers
>> 1 2 3 4 5 6 7 8 9
Internet
>> 1 2 3 4 5 6 7 8 9 10
Software
>> 1 2 3 4 5
Web Design
>> 1 2 3 4 5
Web Hosting
>> 1 2 3 4 5
Web Promotion
>> 1 2 3 4 5
Web Resources
>> 1 2 3 4 5
Recreation
>> 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Casino
>> 1 2 3 4 5 6
Health
>> 1 2 3 4 5 6 7 8 9 10 11
Shopping
>> 1 2 3 4 5 6 7 8 9 10 11
Miscellaneous
>> 1 2 3 4 5 6 7 8 9 10

© Copyright 2006 BestWebMasterStuff.com All Rights Reserved.