HotDocs.Server.TemplateInfo Class

This object lets you gather information about the files on which a given HotDocs template depends. For example, most templates consist of a template (e.g., .DOCX) file, along with a corresponding component file. If you use shared component files, a template would also depend on that shared component file. Likewise, INSERT or ASSEMBLE instructions in a template also introduce additional dependencies.

Namespace: HotDocs.Server
Assembly: HotDocs.Server in HotDocs.Server.dll

This class implements the following interfaces:

  • IDisposable: The class can be disposed.

Methods

Method Description
TemplateInfo (constructor) This constructor opens a template to inspect its file dependencies. When you are finished with the template, call Dispose.
Dispose This method closes the template.

Properties

Property Description
ComponentCollection [Read-only] This property returns the ComponentCollection for the specified template.
Dependencies [Read-only] This property returns a DependencyCollection, which is a list of all dependencies for the template. Unlike the RecursiveDepencencies property, this property shows only the top-level dependencies for the template. If you want to get all of the dependencies for each dependency, you must recurse through each dependency in the collection.
EffectiveComponentFile [Read-only] This property returns the file path of the "effective" component file used by the template. For example, if the template uses a shared component file, this will return the path of the shared file instead of the template's own component file.
PointedToComponentFile [Read-only] This property returns the file path of the shared component file used by the template. If there is no shared component file, it returns an empty string.
PrimaryComponentFile [Read-only] This property returns the file name of the template's primary component file. (In the case of a template that uses a shared component file, this property is used to get the path of the template's own component file and not the shared component file path.)
RecursiveDependencies [Read-only] This property returns a DependencyCollection, which is a complete, recursive list of all dependencies for the template and its dependencies. If you just want the top-level list of dependencies without recursion, use Dependencies instead.
TemplateDescription Get the template description as defined in the primary component file.
TemplateTitle Get the template title as defined in the primary component file.