Difference between revisions of "User:Alistaire/Template:DefsStdTemplateHeader"
Jump to navigation
Jump to search
(Fixed parameter checks) |
(Updated parameters) |
||
Line 1: | Line 1: | ||
<noinclude>{{Documentation}}</noinclude><includeonly>{{#if:{{{hideParents|}}}||'''Parents''': {{{parents|none specified}}}<br/>}} | <noinclude>{{Documentation}}</noinclude><includeonly>{{#if:{{{hideParents|}}}||'''Parents''': {{{parents|none specified}}}<br/>}} | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
− | !colspan="{{#expr: 3+{{#if:{{{ | + | !colspan="{{#expr: 3+{{#if:{{{showExamples|}}}|1|0}}-{{#if:{{{hideNotes|}}}|1|0}}}}"|{{User:Alistaire/Template:DefsStdFormatter|{{{tag|{{PAGENAME}}}}}|{{{link|}}}}} |
|- | |- | ||
!Element name | !Element name | ||
!Data type | !Data type | ||
!style="width: 650px;"|Notes | !style="width: 650px;"|Notes | ||
− | {{#if:{{{ | + | {{#if:{{{showExamples|}}}|!Examples|}}</includeonly> |
Revision as of 16:21, 12 April 2015
Example documentation
Parameters
Parameter | Explanation |
---|---|
showExamples | (optional): If it exists, shows an Examples column. |
hideParents | (optional): If it exists, hides the "Parents:" section. |
hideNotes | (optional): If it exists, hides the Notes column. |
parents | (required): A list of User:Alistaire/Template:DefsStdFormatter -type links to this tag's parents. |
tag | (optional, default: PAGENAME): What tag to display on the first row. |
link | (optional): What the tag links to, if that is different from the name itself. |
Examples
Input | Output | ||||||||
---|---|---|---|---|---|---|---|---|---|
{{User:Alistaire/Template:DefsStdTemplateHeader}} |- |} |
.{{User:Alistaire/Template:DefsStdTemplateHeader}} |- |} | ||||||||
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=thingDef|parents={{User:Alistaire/Template:DefsStdFormatter|ThingDefs|Defs}}|showExamples=1}} |- |} |
Parents: <>ThingDefs
| ||||||||
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=biomeDef|hideParents=1}} |- |} |
|
See also
The above documentation is transcluded from User:Alistaire/Template:DefsStdTemplateHeader/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this page. |