Template.nuva

The “Template.nuva” is the script file for creating other files required by this template. The following figure shows the content of the “Settings.Preview.html” of the template “WebTemplates\Searchable\Default”. All Nuva code should be embedded in “<.” and “.>” (or “[.” and “.]”).

Figure 88           Template.nuva example

 

The file statement:

The file statement executes a sub-script file and captures the output of the sub-script file and then saving to an output file. The sub-script file can be any text file (with or without embedded Nuva tags). Examples:

Syntax:

1.    sourceFilename: The filename includes related path to the current file. Should be a string constant and cannot be a variable.

2.    Overwrite: true/false. Indicate if the output file should be overwritten while the output file is exists.

3.    Target: The output filename. If “target” is null or is empty string, the output of the file will not saving to a file but output to the current location.

 

System.File.Copy function:

The “System.File.Copy” can copy file(s) or folder(s) from source to target.

Syntax:

           

1.    Source: The source file(s) or folder(s). Should be full path. Wildcards “*” and “?” can be used.

2.    Target: The target filename or path. Should be full path.

3.    Overwrite: Indicate if the target files should be overwritten while exists.

 

Related Topics

Contents of a Template