Home
Random
Log in
Settings
About the Petit Planet Wiki
Search
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.
Anti-spam check. Do
not
fill this in!
{{Documentation/Header}} {{Lua|Card}} {{CSS|Gadget-Card}} {{See Also|Template:Card List|Template:Item}} Template that creates an item-style card with an image, quality, label, caption, modifiers, and optional data-driven icons. ==Syntax== <syntaxhighlight lang="wikitext" copy> {{Card}} </syntaxhighlight> This template has 2 unnamed parameters: * {{F|1}} / {{F|name}} – Name of the item. * {{F|2}} / {{F|text}} / {{F|label}} / {{F|x}} / {{F|count}} / {{F|amount}} – Text or quantity for the item. * {{F|show_text}} / {{F|show_label}} – Set to {{F|1}} to show the text. * {{F|caption}} – Caption for the card. * {{F|show_caption}} – Set to {{F|1}} to show the caption. * {{F|caption_width}} – Width of the caption {{Color|New|including}} the length unit. Default: {{F|76px}} (full), {{F|56px}} (mini). * {{F|image}} – Set another image for the card. * {{F|size}} – Size of the image {{Color|Old|excluding}} the length unit. Default: {{F|70}} (full), {{F|48}} (mini). * {{F|ext}} – Extension of the image. Default: {{F|png}}. * {{F|quality}} / {{F|rarity}} – Quality of the item. Default: see [[Module:CentralData]]. * {{F|type}} – Data type for the item. * {{F|suffix}} – Special keyword to adjust the image's suffix. * {{F|link}} – Set another page to be linked. * {{F|link_suffix}} – Append a suffix to the link. * {{F|no_link}} – Set to {{F|1}} to omit the link. * {{F|mini}} – Set to {{F|1}} for a mini card. ==Examples== ===Default=== {{Example|no_copy=1|<nowiki> {{Card|Mobai}} </nowiki>}} {{Example|no_copy=1|<nowiki> {{Card|Mobai|size=128|show_text=1}} </nowiki>}} {{Example|no_copy=1|<nowiki> {{Card|Mobai|image=Unknown Icon.png|show_caption=1}} </nowiki>}} {{Example|no_copy=1|<nowiki> {{Card|Mobai|text=Text|caption=Caption|show_caption=1|quality=purple|link=Neighbor}} </nowiki>}} ===Mini=== {{Example|no_copy=1|<nowiki> {{Card|White Archiboo|mini=1}} </nowiki>}} {{Example|no_copy=1|<nowiki> {{Card|White Archiboo|mini=1|x=5|caption=Really long caption|show_caption=1|caption_width=80px|no_link=1}} </nowiki>}} ==Template Data== <templatedata> { "params": { "1": { "aliases": [ "name" ], "label": "Name", "description": "Name of the item.", "type": "string", "suggested": true }, "2": { "aliases": [ "text", "label", "x", "count", "amount" ], "label": "Text", "description": "Text or quantity for the item.", "type": "string" }, "show_text": { "aliases": [ "show_label" ], "label": "Show text", "description": "Set to 1 to show the text.", "example": "1", "type": "boolean" }, "caption": { "label": "Caption", "description": "Caption for the card.", "type": "string" }, "show_caption": { "label": "Show caption", "description": "Set to 1 to show the caption.", "example": "1", "type": "boolean" }, "caption_width": { "label": "Caption width", "description": "Width of the caption including the unit length.", "example": "100px, 3em", "type": "string", "default": "74px (full), 56px (mini)" }, "quality": { "aliases": [ "rarity" ], "label": "Quality", "description": "Quality of the item.", "example": "Gray, Purple, Gold", "type": "string", "default": "See Module:CentralData for default values." }, "type": { "label": "Type", "description": "Data type for the item.", "type": "string" }, "suffix": { "label": "Suffix", "description": "Special keyword to adjust the image's suffix.", "type": "string" }, "link": { "label": "Link", "description": "Set another page to be linked.", "type": "wiki-page-name" }, "link_suffix": { "label": "Link suffix", "description": "Append a suffix to the link.", "type": "string" }, "no_link": { "label": "No link", "description": "Set to 1 to omit the link.", "example": "1", "type": "boolean" }, "mini": { "label": "Mini", "description": "Set to 1 for a mini card.", "example": "1", "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.", "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>
Summary:
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:||}}
{{#if:<condition>|<result if true>|<result if false>}}
{{#ifeq:|||}}
{{#ifeq:<text1>|<text2>|<result if text1=text2>|<result if text1≠text2>}}
{{#expr:}}
{{#expr:<mathematical expression>}}
{{#switch:||#default=}}
{{#switch:<text1>|<text2>=<result if text1=text2>|<text3>=<result if text1=text3>|#default=<result if no valid match>}}
{{#replace:||}}
{{#replace:<text1>|<plain text to find in text1>|<plain text to insert in place of the text found>}}
{{#titleparts:}}
{{#replace:<page name>}}
{{#tag:|}}
{{#tag:<name of html tag>|<content inside html 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
—
,
­
Pages included on this page:
Template:Array
(
edit
)
Template:CSS
(
edit
)
Template:Card
(
edit
)
Template:Color
(
edit
)
Template:Documentation/Header
(
edit
)
Template:Documentation/styles.css
(
edit
)
Template:Example
(
edit
)
Template:F
(
edit
)
Template:Lua
(
edit
)
Template:MessageBox
(
edit
)
Template:Namespace
(
edit
)
Template:See Also
(
edit
)
Module:Arguments
(
edit
)
Module:Arguments/i18n
(
edit
)
Module:Array
(
edit
)
Module:Card
(
edit
)
Module:CentralData
(
edit
)
Module:CentralData/Accessories
(
edit
)
Module:CentralData/Aquatic Creatures
(
edit
)
Module:CentralData/Basic Furniture
(
edit
)
Module:CentralData/Bottoms
(
edit
)
Module:CentralData/Crops
(
edit
)
Module:CentralData/Currencies
(
edit
)
Module:CentralData/Decorations
(
edit
)
Module:CentralData/Dishes
(
edit
)
Module:CentralData/Flowers
(
edit
)
Module:CentralData/Footwear
(
edit
)
Module:CentralData/Functional
(
edit
)
Module:CentralData/Greenery
(
edit
)
Module:CentralData/Headwear
(
edit
)
Module:CentralData/Hoisery
(
edit
)
Module:CentralData/Housing
(
edit
)
Module:CentralData/Interior Fixtures
(
edit
)
Module:CentralData/Items
(
edit
)
Module:CentralData/Land Creatures
(
edit
)
Module:CentralData/Luca Fruit
(
edit
)
Module:CentralData/Miscellaneous
(
edit
)
Module:CentralData/Neighbors
(
edit
)
Module:CentralData/One-Pieces
(
edit
)
Module:CentralData/Others
(
edit
)
Module:CentralData/Outdoor Decor
(
edit
)
Module:CentralData/Reactions
(
edit
)
Module:CentralData/Redirects
(
edit
)
Module:CentralData/Sets
(
edit
)
Module:CentralData/Shore-Dwellers
(
edit
)
Module:CentralData/Styling
(
edit
)
Module:CentralData/Titles
(
edit
)
Module:CentralData/ToolSkin
(
edit
)
Module:CentralData/Tools
(
edit
)
Module:CentralData/Tops
(
edit
)
Module:Color
(
edit
)
Module:Common/i18n
(
edit
)
Module:Config
(
edit
)
Module:Documentation
(
edit
)
Module:Documentation/config
(
edit
)
Module:Documentation/i18n
(
edit
)
Module:Entrypoint
(
edit
)
Module:Example
(
edit
)
Module:Exists
(
edit
)
Module:Fallbacklist
(
edit
)
Module:Feature
(
edit
)
Module:Formatting
(
edit
)
Module:Hatnote
(
edit
)
Module:Hatnote/i18n
(
edit
)
Module:I18n
(
edit
)
Module:Languages
(
edit
)
Module:Mbox
(
edit
)
Module:Mbox/i18n
(
edit
)
Module:Namespace detect
(
edit
)
Module:Namespace detect/config
(
edit
)
Module:Namespace detect/data
(
edit
)
Module:TableTools
(
edit
)
Module:TemplateData
(
edit
)
Module:Yesno
(
edit
)