Contents

# Templates in the Template Manager

The recommended method for working with templates is to use the Template Manager and the commands in the File - Templates submenu, Edit Template and Save as Template. These commands are sufficient for basic management of templates in LibreOfficeDev.

This guide explains how the file system interacts with the Template Manager. This information is particularly useful if you want to manage directories directly, but still be coordinated with the Template Manager.

## Working with Template Files

The Template Manager recognizes template files by their file extension. The following extensions are recognized:

Application | Extensions
--- | ---
Writer | .ott .otm .oth .stw .dot .dotx
Calc | .ots .stc .xlt .xltm .xltx
Impress | .otp .pot .potm .potx .sti
Draw | .otg .std

For information about the meaning of the extensions see Filter Conversion.

## Working with Template Names

The Template Manager shows the Title field of a document as the Template Name. As long as the Title field is not empty, the filename has no consequences for the Template Name shown in the Template Manager. If the Title field is empty, the filename, without extension, is shown as the Template Name.

If two templates have the exact same entry in the Title field and belong to the same Category, then only one template appears in the Template Manager.

Titles are case-sensitive. For example, if one template in category My Templates has the title a4 and another has the title A4, then both templates appear in the Template Manager. If both templates have the title A4, then only one appears.

If templates have the same title, but belong to different categories, then all appear in the Template Manager. For example, if three templates have the title A4, and each template belongs to a different category, then all three templates appear with the Template Name A4.

You can edit the Title field by choosing File - Properties - Description. If you change the Title field, then the new title also appears as the Template Name in the Template Manager. Alternatively, if you use the Rename command in the context menu for a template, then the Title field of the template is changed to the new Template Name.

If you use the File - Save as Template dialog, then the name entered in that dialog is used as the filename and entered into the Title field. If you change the filename later, the template will still appear in the Template Manager according to the entry in the Title field.

The Title field of a template is included in the Title field of new documents created from the template.

## Controlling which Files Appear in the Template Manager

The Template Manager displays templates located in the directories defined in the Paths dialog for Templates. The dialog is found by choosing LibreOfficeDev - Preferences Tools - Options - LibreOfficeDev - Paths, selecting Templates, and clicking Edit.

### Internal Paths

The Internal Paths directories cannot be changed. They identify the location of the predefined templates. These templates are always shown in the Template Manager.

### User Paths

The default setting for User Path is the template subdirectory in the user profile directory. The location of the {user profile} directory is determined when LibreOfficeDev is installed. See the Default location section in the Wiki page about LibreOffice user profile for more information about typical locations of the user profile in different operating systems.

Templates in the directories specified in User Path and its subdirectories are shown in the Template Manager. Subdirectories within subdirectories are not recognized.

You can add additional directories to the User Path. There has to be at least one directory in User Path, but there are no limits on where it is located.

It is not a good idea to add a root Document directory, or other high-level directory, to your template User Path. All subdirectories in a User Path directory appear in the Template Manager as Categories.

If you have more than one directory in the User Path, then you must select which directory will be used to save a document as a template when the File - Save as Template command is used.

The Default button resets User Path to the initial setting when LibreOfficeDev was installed.

## Working with Categories

The names of subdirectories in the user-defined directories appear as Category names in the Template Manager. If you rename a category, the subdirectory continues to be used, with the new category name stored in groupuinames.xml in the selected Default Path.

When a Category is selected, then all templates in that subdirectory are shown in the Template Manager, if All Applications is the Filter selection.

A category can only show templates in its own subdirectory, with two exceptions.

- All Categories shows all templates, relative to the Filter selection.

- My Templates shows all templates in the directories specified in User Path, relative to the Filter selection.

Categories within a Category are not possible, because subdirectories within subdirectories are not recognized.

You can only rename and delete categories in the Default Path selected in the Edit Paths dialog.

If you delete a Category whose subdirectory is in the selected Default Path, then the subdirectory associated with the Category name and any files in the subdirectory are deleted.

Related Topics

Manage Templates

Paths