How to configure display templates
Display templates control how each owned (subordinate) element renders as a line of text inside its parent’s compartment on diagrams.
Set the template
Section titled “Set the template”- Select the parent element type (e.g., “Entity”)
- In the Properties panel, find the Subordinate Types entry for the owned element type
- Set the Display template field
Template syntax
Section titled “Template syntax”Templates use {placeholders} that are replaced with actual values:
| Placeholder | Resolves to |
|---|---|
{name} | The owned element’s name |
{PropertyName} | A property value by name |
{PropertyName? [suffix]:} | Conditional — only show the suffix if the property has a value |
Literal text (colons, spaces, brackets) is included as-is.
Examples
Section titled “Examples”| Template | Sample output |
|---|---|
{name} | customerId |
{name} : {Data Type} | customerId : Integer |
{name} : {Data Type}{Is Primary Key? [PK]:} | customerId : Integer [PK] |
{name}{Data Type? ({Data Type}):} | customerId (Integer) or notes if no type |
- Keep templates concise — compartment space is limited
- Use conditional placeholders for optional properties to avoid empty brackets or labels
- The template applies to all instances of the subordinate type — choose a format that works for the typical case