{/doc/acs-templating {Templating}} {Templating System Tag Reference: include-optional} Templating System Tag Reference: include-optional <master>

## Include

Templating System : Designer Guide : Tag Reference : include-optional

### Summary

The `include-optional` tag is used to include another template in the current template, but make some other chunk dependent on whether or not the included template returned something.

This is useful if, say, you want to wrap the template with some HTML, for example, a frame in a portal, but if there's nothing to show, you don't want to show the frame either.

### Usage

    <include-optional src="blog-months">
      <tr>
        <th bgcolor="\@header_background_color\@">
          Archive
        </th>
      </tr>
      <tr>
        <td nowrap align="center">
          <include-output>
        </td>
      </tr>
      <tr>
        <td height="16">
          <table><tr><td></td></tr></table>
        </td>
      </tr>
    </include-optional>

### Notes

- The output of the included template will be put where the `<include-output>` appears.

Tag added by: Lars Pinds (lars\@collaboraid.net)
Documentation added from sources on Nov 2002, Roberto Mello.