Using Studio Templates
This chapter describes how to use Studio Templates.
Templates are a repeatable way to insert functionality into Studio editor windows. There are two types of templates:
To ensure that Studio templates open quickly, disable the automatic detection of proxy settings in Internet Explorer.
Open Internet Explorer and select
and the Connections
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.
You can open a template using
, 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.
Studio comes with a set of templates. You can see a list of all templates in Studio in the %SYS namespace,
. To see templates usable in the current document, use
. These templates are described below.
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.
This section contains three tables defining the templates available in Studio:
||Select to insert an HTML color value string (such as #F0F0F0) at the cursor point.
||Select to insert an HTML input control at the cursor point.
||Select to insert a <SCRIPT> tag at the cursor point, with the specified language and content.
||Select to insert an HTML table at the cursor point with the specified characteristics. Select Preview to display a preview window.
||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
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
||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.
menu contains a list of wizards with which you can add items to your project. The menu contains the following add-ins.
Content Date/Time: 2019-07-19 06:48:23