eXo Platform 3.5

## Chapter 10. Operations With Templates

The Template file is a combination of HTML code and Groovy code blocks. In eXo IDE, you can create and edit those files in editor.

## Create and Edit Template

To create a new Gr template, do as follows:

- Step 1: Click the New icon on the toolbar and then select Template from the drop-down menu; or select File > New > Template on the top menu. A new file is opened in the editor.

- Step 2: Add content.

- Step 3: Save the file by selecting File > Save As on the top menu, or by clicking the Save As icon on the toolbar.

Both Outline Panel and Autocomplete form can be used to edit the Groovy Template.

Illustration. Operations with ECM templates

## View Template's Properties

To view properties of the Template, click the Show Properties button on the right corner of the toolbar.

## Preview Template

To preview the template, do as follows:

- Step 1: Open your desired Groovy template in the Content Panel.

- Step 2: Click the Show Preview button on the toolbar; or go to Run > Show Preview on the top menu.

The selected template is opened in the Gadget Container of the Preview Tab as below:

Illustration. Groovy Templates preview