When you're working with a map that displays labels for elements, connections, or loops, Kumu will only display the text in the Label field by default. If you want to include other fields in the label, label templates can help you do that.
<iframe width="560" height="315" src="https://www.youtube.com/embed/tqF5xJ9MfZo" frameborder="0" allowfullscreen></iframe>
Label templates are customized through the Advanced Editor, using a simple syntax.
selector {
label: "{{Field name}}";
}
Replace selector
with any valid selector, and replace Field name
with the name of any of your fields. Remember to wrap each field name in double curly brackets {{}}
and wrap the entire label
value in double quotes.
For example, below is the code for an element label that includes the label and element type.
element {
label: "{{label}} {{element type}}";
}
When using the Type field in label templates, you need to specify whether it is Element Type, Connection Type, or Loop Type. For example, use {% raw %}{{connection type}}{% endraw %}
when adding Type to a connection's popover.