Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Topic |
Prev | Next |
Creating a Template Fragment
A Template Fragment can return data from either an SQL Query, Model Scripts or Project Browser data. The process of defining the content of a Template Fragment depends on which of these types of data you want your Template Fragment to return, although in all cases the process is very similar to creating a normal document template.
Access
Use one of the methods outlined here to open the 'New Document Template' dialog.
Ribbon |
Publish > Documentation > Document Templates > New Template icon |
Context Menu |
Right-click on Package | Documentation | Generate Documentation > Templates : New |
Keyboard Shortcuts |
> Templates : New |
Other |
In the Resources window, expand the 'Document Generation' folder, then:
|
Create a new Template Fragment
Step |
Action |
See also |
---|---|---|
1 |
Using one of the methods above, display the 'New Document Template' dialog. |
Document Templates |
2 |
In the 'New Template' field, type the name for the Template Fragment. |
|
3 |
In the 'Template Type' field, click on the drop-down arrow and select the 'Fragments' option. |
|
4 |
In the 'Copy Template' field, click on the drop down arrow and select either:
|
|
5 |
In the 'Template Group' field either:
The Template Group determines the location of the Template Fragment in the Resources window. |
Resources |
6 |
Click on the . The Document Template Designer displays in the Diagram View. |
Design Custom Document Templates |
7 |
Define the contents of your Template Fragment; the actual steps you follow depend on the data type you want the Template Fragment to return:
Alternatively, if you want to use the Template Fragment to call other Fragments depending on element type, define it as a Template Selector. |
Custom SQL Fragments Design Custom Document Templates Custom Script Fragments Define a Template Selector |
8 |
Once you have created the Template Fragment, you incorporate it into a normal template (or into an existing Template Fragment, if you wish). |
Adding Fragments to a Document Template |
Notes
Learn more