A+ Web Design

For affordable, custom web design.

Tutorial: Using Server Side Includes in Dreamweaver

Posted by A+ Web Design Categories: Dreamweaver Print This Post Print This Post

Step 5: Dreamweaver CS3 Tutorial – Using Server Side Includes

[This is Step 5 of the Dreamweaver CS3 Tutorial]


Server Side Includes (SSI) help you to centralize areas of your site that are common to many pages. This helps you to easily make site-wide changes to these common areas and thus helps in maintenance and consistency. When you design a website it is better to design it for easy maintenance. As you add pages your menus will change to incorporate that. You might want to change the mast, footer etc.

The advantage with server side includes (SSI) is that when you make a change to an include you don’t have to update all the pages that access it. The changes will automatically get reflected in them. You will not have to upload all the pages that use the include every time you make a change, just the include itself.

Note: All the html pages you create and apply this template to must have the extension .shtml or .shtm.

It is useful to create include files for:

  • header
  • footer
  • menus
  • sub menus

To create an include:

  1. Copy the part of the page that you would like to make into an include.
  2. Create a new html page [File > New > Blank Page > HTML > none]
  3. Go into the HTML code [View > Code] and delete all the default code that Dreamweaver puts in.
  4. Go back to design view [View > Design ] and paste the code that you had copied previously.
  5. Make sure all links in the include file are relative to site root.
  6. Finally save this file in an ‘Includes’ folder.

To insert an include into the template:

  1. Click where you would like to insert the include
  2. Insert > Server Side Include.

 

<< Go back to step 4: Using CSS

Go to step 6: Linking Pages >>

Comments are closed.