
# Working with Server Side Includes

> Publish an HTML snippet as its own page, then pull it into other pages with an SSI directive so a change needs one publish instead of a full site publish.

URL: https://www.hannonhill.com/cascadecms/latest/articles/developing-in-cascade/strategy/working-with-server-side-includes.html
category: Developing in Cascade
article-type: how-to
content-kind: faq
release-availability: all
tags: publishing, templates, blocks
updated: 2026-10-06

You can publish snippets of HTML and pull them in via Server Side Includes (SSI) at runtime on your live web server. This is useful for navigation menus, footers, and anything else used across your site.

One drawback of a push CMS like Cascade CMS is that changing a navigation menu means a full site publish to update every page. With SSI, you publish a single asset and every page picks up the change almost immediately.

## Set up a page type for "include" files

1.  Create a new [Template](https://www.hannonhill.com/cascadecms/latest/articles/design-in-cascade/templates/index.html) with this content:
    ```html
    <!--#​cascade-skip-->
    <pass-through>
      <​system-region name="DEFAULT"/>
    </pass-through>
    ```

1. Create a new [Configuration](https://www.hannonhill.com/cascadecms/latest/articles/design-in-cascade/configurations/index.html) with these settings:
    - Check **Default Output**
    - **Type of Data** — HTML
    - **File Extension** — `.shtml`
    - **Template** — the Template from the first step
    - Check **Publishable**
1. Create a new [Content Type](https://www.hannonhill.com/cascadecms/latest/articles/design-in-cascade/content-types/index.html) with these settings:
    - **Configuration** — the Configuration you just created
    - **Metadata Set** — the Default is usually fine
    - **Type of Content** — No Data Definition (WYSIWYG Only)

## Create the "include" page

1.  From **Add Content**, create a new [XML Block](https://www.hannonhill.com/cascadecms/latest/articles/content-authoring/blocks/xml-blocks.html) with this content:
    ```html
    <!--#​protect-top
    <ul>
      <li>Sample item 1</li>
      <li>Sample item 2</li>
      <li>Sample item 3</li>
    </ul>
    #​protect-top-->
    ```

1. From **Add Content**, create a new **Default → Page**, selecting the Content Type you created above.
1. Name the page `include-file`, then click the **Configure** tab.
1. In the **Regions** section, use the Block chooser on the `DEFAULT` region to select the XML Block above.
1. Submit the page.
1. Publish it to your web server and verify with **More → Live**. You should see a mostly empty page containing just the unordered list.

## Add the SSI directive to your pages

1.  From **Add Content**, create another [XML Block](https://www.hannonhill.com/cascadecms/latest/articles/content-authoring/blocks/xml-blocks.html) with this content:
    ```html
    [​system-view:internal]
    Enter content here that will be displayed inside the CMS only
    [/​system-view:internal]

    [​system-view:external]
    <!--#include virtual="[​system-asset]/full/path/to/include-file[/​system-asset]" -->
    [/​system-view:external]
    ```

1. Create or edit a page, click the **Configure** tab, and in **Regions** attach this XML Block to the region where the snippet should appear.

> The [​system-view](https://www.hannonhill.com/cascadecms/latest/articles/developing-in-cascade/system-pseudo-tags.html) tags control what shows inside the CMS versus what shows once published — necessary because SSIs only work on the live website. The [​system-asset](https://www.hannonhill.com/cascadecms/latest/articles/content-authoring/linking.html) tags around the include path tell the system this is a managed asset whose link should be rewritten on publish.
