Include

Templating System : Designer Guide : Tag Reference : Include

Summary

The include tag is used to include a dynamic subtemplate into the current template. Subtemplates are evaluated in the same fashion as any other dynamic template; the developer may associate data sources and other properties to them.

Usage

<include src="subtemplate.adp" attribute=value ...>

Notes

  • Arguments may be passed to the subtemplate by specifying additional attributes to the include tag. All attributes except for src are assumed to be arguments and are set as variables which the subtemplate may reference using the var tag. To pass a dynamic variable to the subtemplate, specify the variable name surrounded by at signs as the value:

    <include src="subtemplate.adp" source_id="@source_id@" ...>

  • If the src attribute begins with a slash, the path is assumed to be relative to the server root, the parent directory of the tcl library. If not, the path is assumed to be relative to the current template, not the URL of the page request.

  • If the page layout is sensitive to additional whitespace surrounding the subtemplate, then care must be taken that the subtemplate does not contain any blank lines at the beginning or end of the file.


    templating@arsdigita.com