# Include

The `<include>` element allows you to include external ADX templates into your document. This is useful for reusing common template definitions (like headers, footers, or style definitions) across multiple documents.

The included template is rendered and its defined `<template>` and `<style>` elements become available in the current document.

## Example

```xml
<adx>
  <include template="shared_headers" />
  <body template="letterhead">
    <text>Document content here...</text>
  </body>
</adx>
```

In this example, the `shared_headers` template (defined elsewhere in the Atfinity system) is included, making its page templates and styles available for use in the body.

## Attributes

#### `template` (required)

The identifier of the template to include. This references a template defined in the Atfinity system.

## Usage Notes

* `<include>` must be placed directly under the root `<adx>` element
* Multiple `<include>` elements can be used to include several templates
* Included templates contribute their `<pageTemplates>` and `<styles>` to the current document
* The order of inclusion matters if templates define elements with the same identifiers

## Example with Multiple Includes

```xml
<adx>
  <include template="company_styles" />
  <include template="legal_disclaimers" />
  <body template="legal_letter">
    <text>This document uses styles and templates from both includes.</text>
  </body>
</adx>
```

<details>

<summary></summary>

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.atfinity.io/document-xml-adx/adx-elements/include.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
