In this page you configure what template will be used to display an View, based on what property.
Template:DisplayArchiMateViewCustom will call this page to see what the variable DisplayTemplate
should become - or stay the default Template:DisplayArchiMateViewDefault.
Properties of an ArchiMate View 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 DisplayArchiMateView, that will be used. That last rule can be disabled - but is ill-advised.
Examples:
{{#ifeq:{{#var:EXAMPLE PROPERTY}}|EXAMPLE VALUE|{{#vardefine:DisplayViewTemplate|DisplayArchiMateView/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=DisplayArchiMateView/Klasse |{{#var:DisplayTemplate|}} }}}}<!--end if Objecttype exists--> }}
Use another property than WikiTemplate to select the page (unless WikiTemplate exists):
{{#ifexist:DisplayArchiMateView/{{#var:Objecttype|,}}|{{#vardefine:DisplayTemplate|{{#var:Objecttype}}}}}}