Jump to content

Template:Clothing Infobox: Difference between revisions

From The Petit Planet Wiki
No edit summary
mNo edit summary
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><infobox>
<includeonly>{{#invoke:Infobox|main
  <title source="name">
|kind = Clothing
  <format>{{#if:{{{number|}}}|<span class="number">{{{number}}} </span>}}{{{name|{{PAGENAME}}}}}</format>
|sep = ,
  </title>
|class = quality-{{#if:{{{quality|}}}|{{lc:{{{quality}}}}}|none}}
  <image source="image">
|title = <!--
    <caption source="caption-image"/>
-->{{{title|<!--
  </image>
  -->{{{name|{{PAGENAME}}}}}<!--
  <group layout="horizontal">
-->}}}
  <data source="category">
|subtitle = {{{subtitle|}}}
    <label>Category</label>
|image = {{#if:{{{image|}}}|[[File:{{{image|}}}]]|[[File:{{{title|{{{name|{{PAGENAME}}}}}}}} Icon.png]]}}
    <format>[[{{{category}}}]]</format>
|images = {{#if:{{{images|}}}|{{Array|{{{images}}}|;|[[File:²{#explode:{item}¦:¦0}²]]|,|template=1}}}}
  </data>
|tabs = {{#if:{{{images|}}}|{{Array|{{{images}}}|;|²{#explode:{item}¦:¦1}²|,|template=1}}}}
  <data source="type">
|sections = Checkbox, Information, Details, How to Obtain
    <label>Type</label>
 
    <format>[[{{{type}}}]]</format>
|Checkbox_nolabel = 1
  </data>
|Checkbox = Collected
  </group>
|Collected = Mark as collected <span class="tpt-instance wds-checkbox" data-category="{{PAGEID:Dress Up/List}}" data-pageid="{{PAGEID}}"></span>
  <data source="quality">
 
    <label>Quality</label>
|Information_collapsible = Yes
    <format>{{{quality}}}</format>
|Information = Category, Type, Quality, Set, Tags, Selling Price
  </data>
|Category = {{#if:{{{category|}}}|[[{{{category}}}]]}}
  <data source="set">
|Type = {{#if:{{{type|}}}|{{Array|{{{type}}}|;|[[{item}]]|,&nbsp;}}}}
    <label>Set</label>
|Type_label = Type{{#if:{{#explode:{{{type}}}|;|1}}|s}}
    <format>[[{{{set}}}]]</format>
|Quality = {{#if:{{{quality|}}}|<span class="quality-label">{{{quality}}}</span>}}
  </data>
|Set = {{#if:{{{set_link|{{{set|}}}}}}|[[{{{set_link|{{{set}}}}}}|{{{set}}}]]}}
  <data source="tags">
|Tags = {{#if:{{#explode:{{{tags}}}|;|1}}|{{List|{{{tags}}}}}|{{{tags|}}}}}
    <label>Tags</label>
|Selling Price = {{#if:{{{sell|{{{price|}}}}}}|{{Item|Dough|20|x={{{sell|{{{price}}}}}}}}}}
    <format>{{List|{{{tags}}}}}</format>
 
</data>
|Details_collapsible = Yes
  <data source="source">
|Details = Color, Material, Style, Neighbor Match, Neighbor Exclusive
    <label>Source</label>
|Color = {{#if:{{{color|}}}|{{Array|{{{color}}}|;|[[{item}]]|,&nbsp;}}}}
    <format>{{List|{{{source}}}}}</format>
|Color_label = Color{{#if:{{#explode:{{{color}}}|;|1}}|s}}
</data>
|Material = {{#if:{{{material|}}}|{{Array|{{{material}}}|;|²{Material Link¦{item}¦}²|,&nbsp;|template=1}}}}
  <data source="sell">
|Material_label = Material{{#if:{{#explode:{{{material}}}|;|1}}|s}}
    <label>Selling Price</label>
|Style = {{#if:{{{style|}}}|{{Array|{{{style}}}|;|[[{item}]]|,&nbsp;}}}}
    <format>{{Item|Dough|x={{{sell}}}}}</format>
|Style_label = Style{{#if:{{#explode:{{{style}}}|;|1}}|s}}
</data>
|Neighbor Match = {{#if:{{{nmatch|}}}|{{Array|{{{nmatch}}}|;|{item}|,&nbsp;}}}}
</infobox><!--
|Neighbor Exclusive = {{#if:{{{nexclusive|}}}|[[{{{nexclusive|}}}]]}}
 
|How to Obtain_collapsible = Yes
|How to Obtain = Source
|Source = {{#if:{{#explode:{{{source}}}|;|1}}|{{List|{{{source}}}}}|{{{source|}}}}}
|Source_label = Source{{#if:{{#explode:{{{source}}}|;|1}}|s}}
}}{{#if:{{{description|}}}|{{Description|{{{description}}}}}}}<!--
 
-->{{#invoke:Bucket|put|clothing
|+templateargs = name, number, quality, category, type, set, set_link, tags, source, description, color, material, style, nmatch, images
|page_id = {{PAGEID}}
|type-delimiter = ;
|tags-delimiter = ;
|sell = {{{sell|{{{price|}}}}}}
|color-delimiter = ;
|material-delimiter = ;
|style-delimiter = ;
|nmatch-delimiter = ;
|source-delimiter = ;
|image = {{{image|{{{title|{{{name|{{PAGENAME}}}}}}}} Icon.png}}}
|images-delimiter = ;
|removed = {{{removed|0}}}
}}<!--
 
-->{{Namespace|main=<!--
-->{{Namespace|main=<!--
-->[[Category:Dress Up]]<!--
-->[[Category:Clothing]]<!--
   ID
   Number
-->{{#if:{{{id|}}}|[[Category:Dress Up Items|{{{id|}}}]]|[[Category:Dress Up Items]][[Category:Dress Up Items Missing ID]]}}<!--
-->{{#if:{{{number|}}}|[[Category:Clothing Items|{{{number|}}}]]|[[Category:Clothing Items]][[Category:Clothing Items Missing Number]]}}<!--
   Category
   Category
-->{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}<!--
-->{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}<!--
   Type
   Type
-->{{#if:{{{type|}}}|[[Category:{{{type}}}]]}}<!--
-->{{#if:{{{type|}}}|{{Array|{{{type|}}}|;|[[Category:{item}]]}}|}}<!--
Quality
  Quality
-->{{#switch:{{{quality}}}|Gray|Green|Purple|Gold=[[Category:{{{quality}}} Quality]]}}
-->{{#switch:{{{quality}}}|Gray|Green|Purple|Gold=[[Category:{{{quality}}} Quality]]}}
   {{#if:{{{quality|}}}|[[Category:Dress Up Items by Quality|{{#switch:{{{quality|}}}
   {{#if:{{{quality|}}}|[[Category:Clothing Items by Quality|{{#switch:{{{quality|}}}
   |Gray       = 0
   |Gray     = 0
   |Green       = 1
   |Green   = 1
   |Purple     = 2
   |Purple   = 2
   |Gold       = 3
   |Gold     = 3
   |#default = 4
   |#default = 4
   }}]]}}<!--
   }}]]}}<!--
     Tags
     Tags
-->{{#if:{{{tags|}}}|{{Cat List|{{{tags}}}|{item} Dress Up|{{#if:{{{category|}}}|[[Category:{item} {{{category}}}]]}}{{#if:{{{type|}}}|[[Category:{item}{{{type}}}]]}}}}}}<!--
-->{{#if:{{{tags|}}}|{{Cat List|{{{tags}}}|{item} Clothing}}}}<!--
 
-->{{#if:{{{color|}}}|{{Cat List|{{{color}}}|{item} Clothing}}}}<!--
-->{{#if:{{{material|}}}|{{Cat List|{{{material}}}|{item} Clothing}}}}<!--
-->{{#if:{{{style|}}}|{{Cat List|{{{style}}}|{item} Clothing}}}}<!--
-->{{#if:{{{nexclusive|}}}|[[Category:Neighbor Exclusive Clothing]]}}<!--
  Set
-->{{#if:{{{set|}}}|[[Category:{{{set}}} Set Clothing Items]]}}<!--
-->}}<!--
-->}}<!--
--></includeonly><noinclude>{{Documentation|type=Infobox}}</noinclude>
--></includeonly><noinclude>{{Documentation|type=Infobox}}</noinclude>

Latest revision as of 13:19, 25 October 2026

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template uses Module:Infobox, a script written in Lua.
This template uses CSS found at MediaWiki:Gadget-Infobox.css.

Template that creates an infobox for Clothing items.

Syntax

[edit source]
{{Clothing Infobox
|name        = 
|number      = 
|category    = 
|type        = 
|quality     = 
|set         = 
|color       = 
|material    = 
|style       = 
|nmatch      = 
|description = 
|source      = 
|sell        = 
}}
  • name – Name of the Clothing item.
  • number – Sorting number for the Clothing item.
  • category – Category of the Clothing item.
  • type – Type of the Clothing item.
  • quality – Quality of the Clothing item.
  • set – Set the Clothing item is included in.
  • color – Color tag(s) of the Clothing item as a semicolon separated list.
  • material – Material tag(s) of the Clothing item as a semicolon separated list.
  • style – Style tag(s) of the Clothing item as a semicolon separated list.
  • nmatch – Neighbor Match of the Clothing item as a semicolon separated list.
  • description – Description of the Clothing item.
  • source – Source(s) of the Clothing item as a semicolon separated list.
  • sell – Selling price of the Clothing item.

Other parameters

[edit source]
  • image – Override the default image with a single file. Default: name Icon.png.
  • images – Override the default image with multiple files and tabs.
    • Format: Image 1.ext:Tab 1 name; Image 2.ext:Tab 2 name; ... ; Image N.ext:Tab N name.

Example

[edit source]

{{Clothing Infobox
|name        = Wonky Cat Witch's Hat
|number      = 60406
|category    = Outfit
|type        = Headwear
|quality     = Purple
|set         = Wonky Cat Witch
|color       = Brown
|material    = Fabric
|style       = Romantic
|description = A witch hat that simply refuses to sit straight. Could that be where the magic comes from?
|source      = [[Loomix Mart]]; [[Loomix Curated Apparel: I]]
}}
Wonky Cat Witch's Hat
Collected
Mark as collected
Category
Quality
Purple
Details
Color
Material
Style
A witch hat that simply refuses to sit straight. Could that be where the magic comes from?

Template Data

[edit source]

Template that creates an infobox for Clothings.

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
Namename

Name of the Clothing item.

Example
Wonky Cat Witch's Hat
Stringrequired
Numbernumber

Sorting number for the Clothing item.

Example
60406
Numbersuggested
Categorycategory

Category of the Clothing item.

Example
Outfit
Stringsuggested
Typetype

Type of the Clothing item.

Example
Headwear
Stringsuggested
Qualityquality

Quality of the Clothing item.

Example
Gray, Purple, Gold
Stringsuggested
Setset

Set the Clothing item is included in.

Example
Wonky Cat Witch
Stringsuggested
Set linkset_link

Appoint another page to be linked for the Clothing set.

Stringoptional
Colorcolor

Color tag(s) of the Clothing item as a semicolon separated list.

Example
Brown; White; Pink
Contentsuggested
Materialmaterial

Material tag(s) of the Clothing item as a semicolon separated list.

Example
Fabric; Plush; Metal
Contentsuggested
Stylestyle

Style tag(s) of the Clothing item as a semicolon separated list.

Example
Cool; Sporty; Artistic
Contentsuggested
Neighbor matchnmatch

Neighbor Match of the Clothing item as a semicolon separated list.

Example
One-Size
Contentsuggested
Descriptiondescription

Description of the Clothing item.

Contentsuggested
Sourcesource

Source(s) of the Clothing item as a semicolon separated list.

Example
[[Loomix Mart]]; [[Loomix Curated Apparel: I]]
Contentsuggested
Selling pricesell

Selling price of the Clothing item.

Example
15
Numberoptional
Imageimage

Override the default image with a single file.

Default
<name> Icon.png
Example
Unknown Icon.png
Fileoptional
Imagesimages

Override the default image with multiple files and tabs.

Example
Image 1.ext:Tab 1 name; Image 2.ext:Tab 2 name
Contentoptional