Edit online

Creating New Document Templates

Oxygen XML Author allows you to create your own custom document templates and they will appear in the New document wizard.

Creating a New Document Template

To create your own custom document template and have it appear in the new document wizard, follow these steps:
  1. Create a new file (whatever type of document you need) and customize it to become a starting point for creating new files of this type.
    Tip: You can use editor variables in the template file content and they will be expanded when the files are opened. Also, see Customizing Document Templates for other template customization tips (for example, you could add placeholders or hints to assist authors).
  2. Save the new document template and reference that location in Oxygen XML Author. There are several options for doing this:
    • Saving the new template in a specific framework's directory - Save the new template in a directory (for example, called templates) within that specific framework directory (usually a custom framework). Then open the Document Type configuration dialog box for that specific framework, go to the Templates tab, and click the button in the bottom-right corner to add your new directory to the list. It is recommended that the reference be made relative to the framework directory (for example, ${frameworkDir}/templates). You can also remove any existing entries in the list that aren't applicable or won't be used in your custom framework. Click OK to close the configuration dialog box and then OK or Apply to save your changes.
    • Saving the new template in the Oxygen installation directory - Save the new template in the templates directory of the Oxygen XML Author installation directory ([OXYGEN_INSTALL_DIR]/templates). Document templates saved in this directory will appear in the Global templates category in the New document wizard.
    • Saving the new template in a custom directory - Save the new template in any directory of your choice and then add that directory to the list of templates in the Document Templates preferences page. This user-defined directory will appear in the New document wizard along with all the new document templates that you save inside it. Click OK or Apply to save your changes.
    Tip: If you want to create a new template for a binary file (e.g. a zip archive), you need to add .bin to the end of the file name (for example, *.zip.bin or *.epub.bin). Otherwise, the files will be treated as XML/text documents and you will be prompted to choose the editor type.
    Attention: The name that you use to save the template will be the name that appears in the new document wizard, including capitalization, space, and characters (for example, My Custom Template1.xml will appear in the new file wizard as My Custom Template1). You can also configure the displayed name in a properties file by following the procedure found in the Configure the Displayed Names for Document Templates section.
  3. Open the new document wizard (New toolbar button or File > New) and you should see your custom template in the appropriate folder.
    Note: For DITA templates, they will also appear in the dialog box for creating new DITA topics from the DITA Maps Manager, but if you customize the template, you need to set the type property to dita in the corresponding properties file.