Server-Side Includes
A server-side include (SSI) tells the web server to include the contents of another file before sending the requested document back to the user’s browser. Although it is difficult to preview SSIs with a browser, Dreamweaver mimics the server and includes the chosen document in your HTML document.
To add an SSI to a document, use Insert → Server-Side Include.
In the Select File dialog box that appears,
select the document containing the server-side include. This document
could be a .map file for a
server-side image map or any other file used for a server-directed
process affecting the HTML document served to the user’s
browser. It can even be another file containing HTML, provided that
it doesn’t contain <head> or
<body> tags.
If the included document contains valid HTML code, the resulting page will be viewable in Dreamweaver’s Document window as well. However, server-side includes appear in the Code pane as HTML comments, as shown here:
<!--#include virtual="/calendar.map" -->
Therefore, to select a SSI, you can select the comment placeholder, as seen in Figure 5-17. When the SSI is selected in the Document window, you can set its properties in the Property inspector, also shown in Figure 5-17.

Figure 5-17. The Property inspector for server-side includes
In the Property inspector, set the Type field to Virtual if using an Apache Web Server. Set the Type to File if ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access