Limit templates displayed in New Document Wizard

Oxygen general issues.
JulieP
Posts: 16
Joined: Sat May 30, 2015 2:18 am

Limit templates displayed in New Document Wizard

Post by JulieP »

Is there a way to limit what templates are displayed in the New Document wizard to only display your customized templates?
alin
Site Admin
Posts: 268
Joined: Thu Dec 24, 2009 11:21 am

Re: Limit templates displayed in New Document Wizard

Post by alin »

Hello,

There are 3 types of templates presented in the dialog:
1. New document templates
2. Global file templates - located inside ${oxygenInstallDir}/templates
3. Framework defined templates - defined and located inside each framework

The first two types of templates can be filtered using a Component Validation Plugin Extension. This type of an extension provides a ComponentsValidator implementation that can filter the editor templates.

You can read more about how to create and configure an oXygen plugin here:
http://www.oxygenxml.com/doc/versions/1 ... lugin.html
http://www.oxygenxml.com/doc/versions/1 ... lugin.html
http://www.oxygenxml.com/doc/versions/1 ... lugin.html

We have such a sample plugin extension available in our SDK. The module of interest is named oxygen-sample-plugin-components-validator. I will also send you this plugin on your private email address with some instructions on how to make it work.

To filter the last type of templates (the "Framework templates" category) you should edit each Document Type and remove those templates that you don't want to be displayed in the New Document Wizard (from the Templates tab). As an alternative you can disable the frameworks that you don't use from "Options" -> "Preferences", on the "Document Type Association" options page. A disabled framework will not contribute its templates to the New dialog.
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply