eXo Platform 3.5

## Chapter 9. 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.

The following topics are covered:

- Create and Edit a template.

- View template's properties.

- Preview a template.

## Create and Edit a template

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

2. Add content.

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

Both Outline pane and Auto-complete form can be used to edit the Groovy Template.

## View template's properties

To view properties of the template, click on the right corner of the toolbar.

## Preview a template

1. Open your desired Groovy template in the Content pane.

2. Click on the toolbar;

Or, go to Run --> Show Preview from the top menu.

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

Copyright © 2009-2012. All rights reserved. eXo Platform SAS