Using VDL Include
<vdl-include> enables you to split out commonly used functionality into separate VDL files that can be included in multiple views.
<vdl-page> <vdl-include src="heading.vdl"></vdl-include> </vdl-page>the contents of the heading.vdl file replace the <vdl-include> tag.
<vdl version="4.7">
<h1>Included</h1>
</vdl>
The result would be:
<vdl-page> <h1>Included</h1> </vdl-page>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.
© 2001-2020 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.