Topics
Prev Next

Define a Template Selector

A Template Selector is a Template Fragment that calls other Template Fragments depending on what type of element is being reported. The Template Fragments being called can be system Fragments or existing user-defined Fragments, as listed in the Resources window.

Access

Use one of the methods outlined here to display the 'Custom Query' page of the 'Document Options' dialog.

Ribbon

Publish > Documentation > Document Templates : <select a fragment template> : (Document Options icon) > Custom Query

Context Menu

Right-click on Package | Documentation | Generate Documentation > Templates | Fragments | <Fragment name>, then

(Document Options icon) > Custom Query

Keyboard Shortcuts

F8 > Templates | Fragments | <Fragment name>, then (Document Options icon) > Custom Query

Set Up the Template Selector

Option

Action

See also

Template Selector

Click on this radio button to define the template selection commands.

data field

On separate lines, type each element type and the name of the Template Fragment to use for that element type, in the format:

     ElementType:<stereotype>:Fragment Name

For example (elements not extended by a stereotype):

     Action::Behavioral

     ActionPin::Simple Behavioral

     CollaborationUse::Structural

and (element extended by a stereotype):

     Class: table: Database Table

To identify the fragment to use if elements are reported that have not been specifically identified, type:

     default::Fragment Name

For a complete example, open the system-supplied Template Selector in the 'Document Generation | System Templates | Fragments' folder of the Resources window and review the 'Custom Query' tab of the 'Document Options' dialog.

Resources Element Class

OK

Click on this button to save the changes you have made and close the 'Document Options' dialog.

Learn more