Template:EntityPage: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<!-- define some porperties id of this entity's class -->{{#vardefine:entity_class|{{{class|human}}}}}<!-- -->[[class::{{#var:entity_class}}| ]]<!-- name for this e...") |
mNo edit summary |
||
(16 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 10: | Line 10: | ||
-->{{#vardefine:entity_name|{{{name|{{PAGENAME}}}}}}}<!-- | -->{{#vardefine:entity_name|{{{name|{{PAGENAME}}}}}}}<!-- | ||
-->[[name::{{#var:entity_name}}| ]]<!-- | -->[[name::{{#var:entity_name}}| ]]<!-- | ||
page of the parent | page of the parent | ||
-->{{#vardefine:entity_classpage|{{#ask: [[Category:Entity Classes]] [[class::{{ | -->{{#vardefine:entity_classpage|{{#ask: [[Category:Entity Classes]] [[class::{{#var:entity_class}}]] | ||
| ?# | | ?=# | ||
| mainlabel=- | | mainlabel=- | ||
| limit=1 | | limit=1 | ||
Line 23: | Line 19: | ||
}}}}<!-- | }}}}<!-- | ||
this entity's | entity description | ||
-->{{#vardefine:entity_id|{{#show: {{#var:entity_classpage}} | ?script name }}_{{{instance|0001}}}}}<!-- | -->{{#vardefine:entity_description|{{{description|{{#show: {{#var:entity_classpage}} | ?description }}}}}}}<!-- | ||
-->[[id::{{#var:entity_id}}| ]]<!-- | -->[[description::{{#var:entity_description}}| ]]<!-- | ||
this entity's identifier | |||
-->{{#vardefine:entity_id|{{#show: {{#var:entity_classpage}} | ?script name }}<!-- | |||
-->{{#ifeq:{{{instance|0001}}}|0000||_{{{instance|0001}}}}}<!-- | |||
-->}}<!-- | |||
-->[[entity id::{{#var:entity_id}}| ]]<!-- | |||
this entity's type | |||
-->{{#vardefine:entity_type|{{#show: {{#var:entity_classpage}} | ?entity type }}}}<!-- | |||
-->[[entity type::{{#var:entity_type}}| ]]<!-- | |||
--> | --> | ||
<div style="margin-left: 10px; float: right"> | <div style="margin-left: 10px; float: right; clear: right"> | ||
<center><b>{{#var:entity_name}}</b></center> | <center><b>{{#var:entity_name}}</b>{{#if:{{{variant|}}}| ({{{variant}}})}}</center> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr> | <tr> | ||
Line 38: | Line 44: | ||
<th scope="row" style="text-align: left">Class</th> | <th scope="row" style="text-align: left">Class</th> | ||
<td><center>{{EntityClass|{{#var:entity_class}}}}</center></td> | <td><center>{{EntityClass|{{#var:entity_class}}}}</center></td> | ||
</tr> | |||
<tr> | |||
<th scope="row" style="text-align: left">Type</th> | |||
<td><center><b>{{EntityClassPage_type_{{#var:entity_type}}}}</b></center></td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 44: | Line 54: | ||
</tr> | </tr> | ||
</table> | </table> | ||
</div> | </div><!-- | ||
<includeonly> | |||
[[Category:Entities]]<!-- | --><includeonly><!-- | ||
Define the classes used by this entity | |||
-->{{#arraydefine:entity_classes|{{#ask: [[{{#var:entity_classpage}}]] | ?inherits class= | mainlabel=- | limit=1000 | format=array}}}}<!-- | |||
-->{{#arrayprint:entity_classes||@class|[[has class::@class| ]]}}<!-- | |||
Set categories for this entity | |||
-->[[Category:Entities]]<!-- | |||
-->{{EntityPage_category_{{#var:entity_type}}}}<!-- | |||
--></includeonly><noinclude> | --></includeonly><noinclude> | ||
Line 59: | Line 82: | ||
* <code>instance</code> (required) - instance number of this entity | * <code>instance</code> (required) - instance number of this entity | ||
* <code>name</code> (default: <code><nowiki>{{{PAGENAME}}}</nowiki></code>) - friendly name of the entity | * <code>name</code> (default: <code><nowiki>{{{PAGENAME}}}</nowiki></code>) - friendly name of the entity | ||
* <code>description</code> (default: | * <code>description</code> (default: class description) - key for the localised entity description |
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