Jump to content

Editing Template:Item/doc

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 6: Line 6:
==Syntax==
==Syntax==
<syntaxhighlight lang="wikitext" copy>
<syntaxhighlight lang="wikitext" copy>
{{Item}}
{{Item|}}
</syntaxhighlight>
</syntaxhighlight>
This template has 2 unnamed parameters:
This template has 2 unnamed parameters:
* {{F|1}} / {{F|name}} &ndash; Name of the item.
* {{F|1}} / {{F|name}} &ndash; Name of the item.
* {{F|2}} / {{F|size}} &ndash; Size of the icon {{Color|Old|excluding}} the length unit. Default: {{F|30}}.
* {{F|2}} / {{F|size}} &ndash; Size of the icon. Default: {{F|30}}.
* {{F|x}} / {{F|count}} &ndash; Quantity of the item.
* {{F|x}} / {{F|count}} &ndash; Quantity of the item. Part of the text.
* {{F|type}} &ndash; Special keyword to adjust the file's suffix and prefix.
* {{F|type}} &ndash; Special keyword to adjust the file's suffix and prefix.
* {{F|link}} &ndash; Set another page to be linked.
* {{F|link}} &ndash; Set another page to be linked.
* {{F|text}} &ndash; Display another text instead of the name of the item.
* {{F|text}} &ndash; Display another text instead of the name of the item.
* {{F|no_text}} &ndash; Set to {{F|1}} to omit the complete text.
* {{F|notext}} &ndash; Set to {{F|1}} to omit the complete text. The icon will no longer behave like an inline-block.
* {{F|invert}} &ndash; Set to apply a filter to the image for either day/light or night/dark mode. Available values:
** Default &ndash; See: [[Module:Item/Invert]].
** {{F|Day}} &ndash; Invert the image in day/light mode. Will invert light-colored icons to gray in day/light mode.
** {{F|Night}} &ndash; Invert the image in night/dark mode. Will invert dark-colored icons to white in night/dark mode.
* {{F|note}} &ndash; Append a note after the item text and count.
* {{F|note}} &ndash; Append a note after the item text and count.
* {{F|ref}} &ndash; Append a reference to the item text.
* {{F|ref}} &ndash; Append a reference to the item text.
* {{F|comma}} &ndash; Set to {{F|1}} to append a comma to the item text following AmE rules.
* {{F|comma}} &ndash; Set to {{F|1}} to append a comma to the item text following AmE rules.
* {{F|dot}} &ndash; Set to {{F|1}} to append a dot to the item text following AmE rules.
* {{F|dot}} &ndash; Set to {{F|1}} to append a dot to the item text following AmE rules.
* {{F|comma_spc}} &ndash; Set to {{F|1}} to append a comma and a space to the item text following AmE rules.
* {{F|commaspc}} &ndash; Set to {{F|1}} to append a comma and a space to the item text following AmE rules.
* {{F|dot_spc}} &ndash; Set to {{F|1}} to append a dot and a space to the item text following AmE rules.
* {{F|dotspc}} &ndash; Set to {{F|1}} to append a dot and a space to the item text following AmE rules.


==Examples==
==Examples==
{{Example|no_copy=1|<nowiki>{{Item}}</nowiki>}}
{{T|Item|_Ybr_=1}}<br />
{{Example|no_copy=1|<nowiki>{{Item|Kabuto Beetle}}</nowiki>}}
{{T|Item|p1=Unknown|_Ybr_=1}}<br />
{{Example|no_copy=1|<nowiki>{{Item|Kabuto Beetle|size=64}}</nowiki>}}
{{T|Item|p1=Kabuto Beetle|_Ybr_=1}}<br />
{{Example|no_copy=1|<nowiki>{{Item|Kabuto Beetle|link=Insect|text=Custom text}}</nowiki>}}
{{T|Item|p1=Kabuto Beetle|p2=40|_Ybr_=1}}<br />
{{Example|no_copy=1|<nowiki>{{Item|Dough|x=15|no_text=1}}</nowiki>}}
{{T|Item|p1=Kabuto Beetle|p2=link=Insect|p3=text=Custom text|_Ybr_=1}}<br />
{{Example|no_copy=1|<nowiki>{{Item|Hexia|note=Galaxy}}</nowiki>}}
{{T|Item|p1=Dough|p2=x=15|p3=notext=1|_Ybr_=1}}<br />
{{Example|no_copy=1|<nowiki>{{Item|Elsasani|text="Sani"|dot=1}}</nowiki>}}
{{T|Item|p1=Elsasani|_Ybr_=1}}<br />
{{T|Item|p1=Hexia|p2=note=Galaxy|_Ybr_=1}}


==Template Data==
==Template Data==
Line 55: Line 52:
],
],
"label": "Size",
"label": "Size",
"description": "Size of the icon excluding the length unit.",
"description": "Size of the icon.",
"example": "20, 40",
"example": "20, 40",
"type": "number",
"type": "number",
Line 80: Line 77:
"type": "wiki-page-name",
"type": "wiki-page-name",
"default": "<1>, <name>"
"default": "<1>, <name>"
},
"notext": {
"label": "No text",
"description": "Set to 1 to omit the complete text.",
"example": "1",
"type": "boolean"
},
},
"note": {
"note": {
Line 89: Line 92:
"label": "Reference",
"label": "Reference",
"description": "Append a reference to the item text.",
"description": "Append a reference to the item text.",
"type": "string"
"type": "unbalanced-wikitext"
},
},
"comma": {
"comma": {
Line 103: Line 106:
"type": "boolean"
"type": "boolean"
},
},
"comma_spc": {
"commaspc": {
"label": "Comma and space",
"label": "Comma and space",
"description": "Set to 1 to append a comma and a space to the item text following AmE rules.",
"description": "Set to 1 to append a comma and a space to the item text following AmE rules.",
Line 109: Line 112:
"type": "boolean"
"type": "boolean"
},
},
"dot_spc": {
"dotspc": {
"label": "Dot and space",
"label": "Dot and space",
"description": "Set to 1 to append a dot and a space to the item text following AmE rules.",
"description": "Set to 1 to append a dot and a space to the item text following AmE rules.",
"example": "1",
"example": "1",
"type": "boolean"
"type": "boolean"
},
"no_text": {
"label": "No text",
"description": "Set to 1 to omit the complete text.",
"example": "1",
"type": "boolean"
},
"invert": {
"label": "Invert",
"description": "Set to apply a filter to the image for either day/light or night/dark mode.",
"example": "Day, Night",
"type": "string"
}
}
},
},
"description": "Template that adds a link to icons.",
"description": "Template that adds a link to icons.",
"format": "inline",
"format": "inline"
"paramOrder": [
"1",
"2",
"x",
"type",
"link",
"no_text",
"invert",
"note",
"ref",
"comma",
"dot",
"comma_spc",
"dot_spc"
]
}
}
</templatedata>
</templatedata>
Please note that all contributions to The Petit Planet Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Petit Planet Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.
File Pages==Summary====Licensing=={{Fairuse}}{{File|}}
Dynamic Page List¦²«»²{¦}²«»«/»«!----»
Array in DPL¹^2{}^2^2{¹}^2
Parser Functions{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}
Markup{{}}|[][[]][[Category:]]#REDIRECT [[]] [[Category:Redirect Pages]]<code></code><includeonly></includeonly><noinclude></noinclude><nowiki></nowiki><!----><br>§
Notices{{Stub|}}{{Stub Dialogue}}{{Upcoming}}{{Under Construction}}{{Placeholder|}}
Magic Words{{!}}{{formatnum:}}{{lc:}}{{uc:}}{{PAGENAME}}{{FULLPAGENAME}}{{ROOTPAGENAME}}{{BASEPAGENAME}}{{SUBPAGENAME}}{{DISPLAYTITLE:|noreplace}}__TOC____NOTOC____EXPECTUNUSEDCATEGORY____HIDDENCAT__
HTML Entities&mdash;&nbsp;&comma;&shy;