Jump to content

Editing Template:Card/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 7: Line 7:
==Syntax==
==Syntax==
<syntaxhighlight lang="wikitext" copy>
<syntaxhighlight lang="wikitext" copy>
{{Card}}
{{Card|}}
</syntaxhighlight>
</syntaxhighlight>
This template has 2 unnamed parameters:
This template has 2 unnamed parameters:
Line 15: Line 15:
* {{F|caption}} &ndash; Caption for the card.
* {{F|caption}} &ndash; Caption for the card.
* {{F|show_caption}} &ndash; Set to {{F|1}} to show the caption.
* {{F|show_caption}} &ndash; Set to {{F|1}} to show the caption.
* {{F|caption_width}} &ndash; Width of the caption {{Color|New|including}} the length unit. Default: {{F|76px}} (full), {{F|56px}} (mini).
* {{F|caption_width}} &ndash; Width of the caption.
* {{F|image}} &ndash; Set another image for the card.
* {{F|size}} &ndash; Size of the image {{Color|Old|excluding}} the length unit. Default: {{F|70}} (full), {{F|48}} (mini).
* {{F|ext}} &ndash; Extension of the image. Default: {{F|png}}.
* {{F|quality}} / {{F|rarity}} &ndash; Quality of the item. Default: see [[Module:CentralData]].
* {{F|quality}} / {{F|rarity}} &ndash; Quality of the item. Default: see [[Module:CentralData]].
* {{F|type}} &ndash; Data type for the item.
* {{F|type}} &ndash; Data type for the item.
* {{F|suffix}} &ndash; Special keyword to adjust the image's suffix.
* {{F|suffix}} &ndash; Special keyword to adjust the file's suffix.
* {{F|link}} &ndash; Set another page to be linked.
* {{F|link}} &ndash; Set another page to be linked.
* {{F|link_suffix}} &ndash; Append a suffix to the link.
* {{F|link_suffix}} &ndash; Append a suffix to the link.
Line 34: Line 31:


{{Example|no_copy=1|<nowiki>
{{Example|no_copy=1|<nowiki>
{{Card|Mobai|size=128|show_text=1}}
{{Card|Mobai|show_text=1}}
</nowiki>}}
</nowiki>}}


{{Example|no_copy=1|<nowiki>
{{Example|no_copy=1|<nowiki>
{{Card|Mobai|image=Unknown Icon.png|show_caption=1}}
{{Card|Mobai|show_caption=1}}
</nowiki>}}
</nowiki>}}


{{Example|no_copy=1|<nowiki>
{{Example|no_copy=1|<nowiki>
{{Card|Mobai|text=Text|caption=Caption|show_caption=1|quality=purple|link=Neighbor}}
{{Card|Mobai|text=Text|caption=Caption|show_caption=1|quality=purple}}
</nowiki>}}
</nowiki>}}


Line 84: Line 81:
],
],
"label": "Show text",
"label": "Show text",
"description": "Set to 1 to show the text.",
"description": "Set to 1 to show the label.",
"example": "1",
"example": "1",
"type": "boolean"
"type": "boolean"
Line 101: Line 98:
"caption_width": {
"caption_width": {
"label": "Caption width",
"label": "Caption width",
"description": "Width of the caption including the unit length.",
"description": "Width of the caption.",
"example": "100px, 3em",
"example": "75px",
"type": "string",
"type": "string"
"default": "74px (full), 56px (mini)"
},
},
"quality": {
"quality": {
Line 123: Line 119:
"suffix": {
"suffix": {
"label": "Suffix",
"label": "Suffix",
"description": "Special keyword to adjust the image's suffix.",
"description": "Special keyword to adjust the file's suffix.",
"type": "string"
"type": "string"
},
},
Line 147: Line 143:
"example": "1",
"example": "1",
"type": "boolean"
"type": "boolean"
},
"image": {
"label": "Image",
"description": "Set another image for the card.",
"example": "Unknown Icon.png",
"type": "wiki-file-name",
"default": "<name> Icon.png"
},
"size": {
"aliases": [
"image_size"
],
"label": "Size",
"description": "Size of the image excluding the unit length.",
"default": "70 (full), 48 (mini)",
"type": "number",
"example": "64, 128"
},
"ext": {
"aliases": [
"image_ext"
],
"label": "Extension",
"description": "Extension of the image.",
"type": "string",
"default": "png"
}
}
},
},
"description": "Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons.",
"description": "Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons.",
"format": "inline",
"format": "inline"
"paramOrder": [
"1",
"2",
"show_text",
"caption",
"show_caption",
"caption_width",
"image",
"size",
"ext",
"quality",
"type",
"suffix",
"link",
"link_suffix",
"no_link",
"mini"
]
}
}
</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;

Pages included on this page: