Template:EntityPage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- | <!-- | ||
define some | define some properties | ||
id of this entity's class | id of this entity's class | ||
Line 13: | Line 13: | ||
page of the parent | page of the parent | ||
-->{{#vardefine:entity_classpage|{{#ask: [[Category:Entity Classes]] [[class::{{#var:entity_class}}]] | -->{{#vardefine:entity_classpage|{{#ask: [[Category:Entity Classes]] [[class::{{#var:entity_class}}]] | ||
| ?# | | ?=# | ||
| mainlabel=- | | mainlabel=- | ||
| limit=1 | | limit=1 | ||
Line 24: | Line 24: | ||
this entity's identifier | this entity's identifier | ||
-->{{#vardefine:entity_id|{{#show: {{#var:entity_classpage}} | ?script name }}_{{{instance|0001}}}}}<!-- | -->{{#vardefine:entity_id|{{#show: {{#var:entity_classpage}} | ?script name }}<!-- | ||
-->{{#ifeq:{{{instance|0001}}}|0000||_{{{instance|0001}}}}}<!-- | |||
-->}}<!-- | |||
-->[[entity id::{{#var:entity_id}}| ]]<!-- | -->[[entity id::{{#var:entity_id}}| ]]<!-- | ||
Line 33: | Line 35: | ||
--> | --> | ||
<div style="margin-left: 10px; float: right; clear: right"> | <div style="margin-left: 10px; float: right; clear: right"> | ||
<center><b>{{#var:entity_name}} | <center><b>{{#var:entity_name}}</b>{{#if:{{{variant|}}}| ({{{variant}}})}}</center> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr> | <tr> | ||
Line 57: | Line 59: | ||
Define the classes | Define the classes used by this entity | ||
-->{{#arraydefine:entity_classes|{{#ask: {{#var:entity_classpage}} | ?inherits class= | mainlabel=- | limit=1000 | format=array}}}}<!-- | -->{{#arraydefine:entity_classes|{{#ask: [[{{#var:entity_classpage}}]] | ?inherits class= | mainlabel=- | limit=1000 | format=array}}}}<!-- | ||
-->{{#arrayprint:entity_classes||@class|[[has class::@class| ]]}}<!-- | -->{{#arrayprint:entity_classes||@class|[[has class::@class| ]]}}<!-- | ||
Latest revision as of 18:39, 13 April 2020
Usage
Template for entity class pages
Parameters:
class
(required) - id of this entity's class - see Property:classinstance
(required) - instance number of this entityname
(default:{{{PAGENAME}}}
) - friendly name of the entitydescription
(default: class description) - key for the localised entity description