Categories


Popular topics


The template list is a child window that displays all templates that have been configured in the Modify templates dialog. You can toggle the output window in the Layout tab.

Double-clicking a template in the template list will insert it into the active file at the caret position. You can also insert templates via the "Insert template" drop down in the Edit tab, or coding templates via the "Code template" drop down in the Coding tab.

Templates are organized in four groups: Global, Layout, Language, and Project. Global templates are always available; Layout templates are only available when the layout they're associated with is loaded; Language templates are associated with languages specified for syntax highlighting and are only available when editing files with extensions included in the language's wordfile; and Project templates are only available when the project they're associated with is loaded. For more information, see the Template groups documentation.

Context menu

The template list includes the following context menu items:

Modify templates Opens the Modify templates dialog.
Open template file Opens the template group's XML-based template file directly in the editor.

When right-clicking a template within the template list, the following context menu items are available:

Sort alphabetically Sorts templates alphabetically within active group.
Move up Moves the selected template up one position in the list.
Move down Moves the selected template down one position in the list.
Delete template Deletes the selected template from the list and the associated template file.
Add/modify template Opens the Modify templates dialog so the selected template may be edited or new templates added.
Insert template Inserts the selected template into the active document.

Template description / tool tip

You can include a description for a template in the Modify templates dialog. Template descriptions are limited to 79 characters. If a description is provided, then when the cursor hovers over the template name in the template list, a tool tip will be displayed with the label "Template description" followed by the template's description. If a description hasn't been set, the label "Template extract" will be displayed along with the beginning portion of the template itself.

Creating templates

Along with manually creating templates in the Modify templates dialog, you can also select text in a file and drag this to a template group in the template list to quickly create a template. The newly created template will be given a generic default name which is immediately editable. In order to quickly create templates in this manner, "Disable drag & drop" must be unchecked under Settings » Editor » Miscellaneous.

MediaWiki spam blocked by CleanTalk.