Skip to main content

Using Studio Templates

This topic describes how to use Studio Templates.

Templates are a repeatable way to insert functionality into Studio editor windows. There are two types of templates:

  • Text Template — (what is meant by the word Template) A Simple Text Template inserts generated text into a document. An Interactive Text Template includes user input. To access text templates, select Tools > Templates > Templates....

  • Add-in Template — Creates a new tool in Studio. An Add-in Template differs from a Text Template in that it does not inject text into a document and does not require an open document.

    Add-ins are available using Tools > Add-ins. For information on using the SOAP Web client wizard, see Creating Web Services and Web Clients. For information on using the XML Schema Wizard, see Using the XML Schema Wizard.

Note:

To ensure that Studio templates open quickly, disable the automatic detection of proxy settings in Internet Explorer.

  1. Open Internet Explorer and select Tools > Internet Options and the Connections tab.

  2. Select LAN Settings and uncheck any checked boxes. Make sure nothing on this page is checked and then select OK twice to close the Internet Options dialog.

Accessing Studio Templates

You can open a template using Tools > Templates, as well as with the right-click menu in the editor window. Each template is associated with one or more document types; only templates associated with the current window's document type are shown in the Template list.

There are two styles of text templates: simple and interactive. A simple template inserts text at the cursor point with no further user interaction. An Interactive Template displays one or more screens soliciting additional information, like a wizard.

Any text that is highlighted when you open a template is replaced by the template. Many templates use the currently highlighted text as input to the template program.

Standard Studio Templates

Studio comes with a set of templates. You can see a list of all templates in Studio in the %SYS namespace, Workspace window, Namespace tab, under CSP files. To see templates usable in the current document, use Tools > Templates > Templates. These templates are described below.

Note:

By default, Studio templates use a session timeout of 90 seconds. If you are entering data into a Studio template, the session ends after 90 seconds of no user input.

Templates

This section contains three tables defining the templates available in Studio:

Templates
Template Description
HTML Color Select to insert an HTML color value string (such as #F0F0F0) at the cursor point.
HTML Input Select to insert an HTML input control at the cursor point.
HTML Script Select to insert a <SCRIPT> tag at the cursor point, with the specified language and content.
HTML Table Select to insert an HTML table at the cursor point with the specified characteristics. Select Preview to display a preview window.
HTML Tag Select to insert an HTML tag at the cursor point, selected from a list with specified attributes. Or if you highlight an existing HTML tag and then invoke the template, you can edit the displayed attribute values.

Example of an Interactive Template, the HTML Color Table
Shows the HTML color table, labeled HTML color wizard.

Class Definition Templates

Many of the templates are available for use in class definitions (they can be useful in &html<> blocks). In addition, the following templates are available:

Class Definition Templates
Template Description
SQL Statement Select to insert code for a specified SQL Statement at the cursor point. Select Preview to see test results of the table (using data in the database) in a popup preview window. You can specify whether the template returns only the SQL text or an embedded SQL cursor based on the SQL text. It can also return a %ResultSet object based on the SQL text, but this is not recommended in InterSystems IRIS®.
Web Form Wizard Select to open a Wizard with which you can create a CSP form, specifying class members and a table style for the form to use.

Add-In Templates

The Tools > Add-Ins menu contains a list of wizards with which you can add items to your project. The menu contains the following add-ins.

Add-Ins
Add-In Function For More Information
Activate Wizard This wizard option is not for use with InterSystems IRIS. For documentation on this wizard, click hereOpens in a new tab.
SOAP Wizard Reads a WSDL (Web Services Description Language) document and creates one or more Web client classes or Web service classes. Creating Web Services and Web Clients
XML Schema wizard Reads an XML schema and creates a set of corresponding classes. Using the XML Schema Wizard.
XSL Translate Wizard Transforms an XML file using a specified XSL stylesheet. Performing XSLT Transformations.
FeedbackOpens in a new tab