Customizing Document Templates
Oxygen XML Developer allows you to customize certain aspects of predefined or custom document templates. For example, you can customize the icons or specify a prefix/suffix that will be used for the proposed file name in the New document wizard.
Customizing the Icons for a Document Template
If you want to customize the icons to be used for document templates, use a properties file to specify the icons using the following procedure:
- Create a new properties file or edit an existing one.
- If you create a new properties file, use the same name as the template file except
with a
.properties
extension (for example,MyTemplate.properties
). This properties file will specify the paths to the icons that will be used in the new file wizard. You can find some examples in thetemplates
directory of the Oxygen XML Developer installation directory to help you get started.When defining the icons, the properties file should look like this:
type=general smallIcon=../icons/Article_16.png bigIcon=../icons/Article_48.png
Important
For DITA files, thetype
property needs to be set to dita. Otherwise, the template will not appear in the dialog box for creating new DITA topics. For all other types of files, set it to general. The icons specified in this properties file will only be used for the new file wizards and not in any other part of the interface.Note
If you created a new template and chose to use a custom directory for the new template (in step 2 of the new template procedure), make sure the path to the icons is relative to that directory. - If you edit an existing template, simply define the icon paths as specified above.
- If you create a new properties file, use the same name as the template file except
with a
- Save the properties file in the same directory as the document template.
- Open the new file wizard ( ) and you should see your custom icons next to the document template in the appropriate folder.
Add a Prefix or Suffix to File Names for a Document Template
You can use a properties file for each document template to add a prefix or suffix to the file name that is proposed in certain dialog boxes when you create a new file from that template. This applies to the following new document dialog boxes:
- The new document dialog box that appears when you select Project view. The prefix or suffix is added to the name of the file in the File name field. from the contextual menu in the
To add a prefix or suffix to the file names for a document template, follow these steps:
- Create a new properties file or edit an existing one.
- If you create a new properties file, use the same name as the template file except
with a
.properties
extension (for example,MyTemplate.properties
). This properties file will specify the prefix/suffix that will be used to propose the file name in the new file wizards.When defining the prefix/suffix, the properties file should look something like this:
type=general filenamePrefix=prod_ filenameSuffix=_test
Important
For DITA files, thetype
property needs to be set to dita. For all other types of files, set it to general. - If you edit an existing template, simply define the prefix/suffix as specified above.
- If you create a new properties file, use the same name as the template file except
with a
- Save the properties file in the same directory as the document template.
- Open the new document wizard (using the methods described above) and when you select the appropriate template, you should see your prefix or suffix in the file name that is proposed in that dialog box.