Defining OTScript Methods in the OTScript Code Editor

As an Administrator, you can define reusable OTScript methods and types, if the methods provided in the Data tab are insufficient for users. These extra methods can be imported and exported, and appear in the Data tab of templates. For more information, see OTScript Method Presentation.

See Also
About the OTScript Files Editor
Managing OTScript Methods
About the Creation of Shortcut Methods
Defining OTScript Methods in Templates
OTScript Language
  1. From the home page, click Configure.
  2. Select the OTScript Files tab.
  3. Click New to create a new file.
  4. Click Edit , rename the default name, and click to validate the name.
  5. Click Insert OTScript Method Example .
    A code suggestion appears in the coding area.
  6. Enter, modify, or copy OTScript code corresponding to one or more methods.
  7. To compile and save the code, click Save .

    Note: If an error is found, a mark appears to identify the line in error, and the error message is displayed in red below the editor.

    Only the first error is visible.

Result:

The defined methods appear in the Data tab of the template editor for all users. If no category is indicated in the code, methods are presented in the Extensions category.