In this page you configure what template will be used to display an element, based on what property.
Template:DisplayArchiMateElementCustom will call this page to see what the variable DisplayTemplate
should become - or stay the default Template:DisplayArchiMateElementDefault.
Properties of an ArchiMate Element can be recalled by calling {{#var:NAME OF THE PROPERTY}}
.
The code of this page shows three ways the template can be set.
By default, anything that's set will be overridden by the last rule: if the property WikiTemplate is set and a template exists with the that name as a subpage of DisplayArchiMateElement, that will be used. That last rule can be disabled - but is ill-advised.
Examples:
{{#ifeq:{{#var:EXAMPLE PROPERTY}}|EXAMPLE VALUE|{{#vardefine:DisplayElementTemplate|DisplayArchiMateElement/bar}}}}
if 'Objecttype' is set, look through the list of 'switch'-parameters; if nothing is found, keep DisplayTemplate:
{{#if:{{#var:Objecttype|}}|{{#vardefine:DisplayTemplate| {{#switch:{{ucfirst:{{#var:Objecttype}}}} |Klasse=DisplayArchiMateElement/Klasse |{{#var:DisplayTemplate|}} }}}}<!--end if Objecttype exists--> }}
Use another property than WikiTemplate to select the page (unless WikiTemplate exists):
{{#ifexist:DisplayArchiMateElement/{{#var:Objecttype|,}}|{{#vardefine:DisplayTemplate|{{#var:Objecttype}}}}}}