Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Size: Difference between revisions

Template page
(added "1" alias for size param)
Tag: 2017 source edit
(removed parser function spaghetti, now using Module:Size for handling)
Tag: 2017 source edit
Line 22: Line 22:
],
],
"required": true
"required": true
},
"Add Category": {
"label": "Add to size category?",
"description": "If \"1\", this article will be added to the selected size's category.",
"type": "boolean",
"suggested": true
}
}
},
},
"description": "Use this template to include a stylized part size string in an article. Requires the Size parameter, selected from a provided list."
"description": "Use this template to include a formatted part size tag in an article. Requires the Size parameter, selected from a provided list."
}
}
</templatedata>
</templatedata>
The part size will appear on the article as per:
The part size will appear on the article as per:
<code><b><font color=#E04949>XS</font></b></code>
{{#invoke:Size|getSize|XS}}
<code><b><font color=#E0A400>SM</font></b></code>
{{#invoke:Size|getSize|SM}}
<code><b><font color=#93E000>MD</font></b></code>
{{#invoke:Size|getSize|MD}}
<code><b><font color=#00E0A8>LG</font></b></code>
{{#invoke:Size|getSize|LG}}
<code><b><font color=#49ABE0>XL</font></b></code>
{{#invoke:Size|getSize|XL}}
<code><b><font color=#A978DA>2X</font></b></code>
{{#invoke:Size|getSize|2X}}
</noinclude>
</noinclude><includeonly>{{#invoke:Size|getSize|{{{Size}}}}}</includeonly>
<includeonly>{{#ifeq:XS|{{{Size}}}|<code><b><font color=#E04949>XS</font></b></code>|{{#ifeq:SM|{{{Size}}}|<code><b><font color=#E0A400>SM</font></b></code>|{{#ifeq:MD|{{{Size}}}|<code><b><font color=#93E000>MD</font></b></code>|{{#ifeq:LG|{{{Size}}}|<code><b><font color=#00E0A8>LG</font></b></code>|{{#ifeq:XL|{{{Size}}}|<code><b><font color=#49ABE0>XL</font></b></code>|{{#ifeq:2X|{{{Size}}}|<code><b><font color=#A978DA>2X</font></b></code>||}}|}}|}}|}}|}}|}}</includeonly><includeonly>{{#ifeq:1|{{{Add Category}}}|[[Category:{{{Size}}} parts]]|}}</includeonly>

Revision as of 17:27, 6 December 2024

Known issue: This template creates a leading whitespace. Use without adding a whitespace as a workaround, e.g., "This engine is{{Size|LG}} and quite shiny."

Use this template to include a formatted part size tag in an article. Requires the Size parameter, selected from a provided list.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
SizeSize size 1

Part size

Suggested values
XS SM MD LG XL 2X
Example
SM, LG, etc.
Stringrequired

The part size will appear on the article as per: XS SM MD LG XL 2X

MediaWiki Appliance - Powered by TurnKey Linux