Initializing help system before first use

# Using VDL Include

When an app written with VDL becomes large, it is common to require the same functionality in several independent views. There is also a case for creating custom extensions to handle certain features or layouts across multiple views. Both requirements are satisfied with the `<vdl-include>` element.

`<vdl-include>` enables you to split out commonly used functionality into separate VDL files that can be included in multiple views.

In the following example:

    <vdl-page>
    		<vdl-include src="heading.vdl"></vdl-include>
    </vdl-page>

the contents of the heading.vdl file replace the `<vdl-include>` tag.
If heading.vdl contained:

    <vdl version="5.8">
    		<h1>Included</h1>
    </vdl>

The result would be:

    <vdl-page>
    		<h1>Included</h1>
    </vdl-page>

Note: There are some important points to note:

- The included file must be a valid VDL file with the `version` attribute set to `3.2` or greater.
- The root `<vdl>` element in the included file is stripped out.
- There is no need to add a `<vdl-page>` to the included file because the contents may be added at any place in the main view VDL code.
- The initial `<vdl-include>` element is removed.
- Included VDL files may not themselves use the `<vdl-include>` element—nesting is not supported.
- An error will result if the included file cannot be found.
- Files are included before all other processing of the view. If a file is included within a conditional section, then the VDL source will be included regardless of whether the conditional is `true` or `false`.
- The path for the included file is always relative to the client_resources folder.

Parent Topic Using Expressions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.