Defining OTScript Methods in Templates

Even if you are not an Administrator, you can define your own reusable OTScript methods and types, if those provided in the Data tab are insufficient.

Important:
  • These methods are only available in the current template.
  • Additional methods from subtemplate call may not be shown so avoid the use of conflicting types or method names.

See Also
OTScript Language Guide
  1. From the Template Editor, select the OTScript tab.
  2. In the coding area, enter or copy OTScript code corresponding to one or more methods.
  3. To compile and save the code, click Save .

    Note: If an error is found:
    • OTScript appears in red italic in the tab.
    • A mark appears to identify the line in error. Hover over the mark to display the error message.

    Only the first error is visible.

Additional methods appear under the corresponding types in the Data tab of the Template Editor. If no category is indicated in the code, methods are presented in the Extensions category.

You can insert these methods, as usual, in your current template.