Template:Collection: Difference between revisions

From Paw Borough Wiki
(Collection template to save myself from manually making those tables.)
 
(Altered to have 2 columns + collapsible/collapsed parameters)
Line 1: Line 1:
<includeonly>{|class="wikitable" style="text-align: center;"
<includeonly>{|class="wikitable {{#switch:{{lc:{{{collapsible}}}}}|true|yes|y=mw-collapsible}} {{#switch:{{lc:{{{collapsed}}}}}|true|yes|y=mw-collapsible mw-collapsed}}" style="text-align: center;"
!colspan="2"|{{#if:{{{title|}}}|{{{title|}}}|See Also}}
!colspan="10"|{{#if:{{{title|}}}|{{{title|}}}|See Also}}
|-{{#if:{{{1|}}}||style="display: none"}}
|-
| [[File:White {{{1|}}}.png|x100px|link={{{1|}}}]]
{{#if:{{{1|}}}|{{!}}[[File:White {{{1|}}}.png|x100px|link={{{1|}}}]]
|[[{{{1|}}}]]
{{!}}[[{{{1|}}}]]
|-{{#if:{{{2|}}}||style="display: none"}}
|{{!}}style="display:none"{{!}}}}
|[[File:White {{{2|}}}.png|x100px|link={{{2|}}}]]
{{#if:{{{2|}}}|{{!}}[[File:White {{{2|}}}.png|x100px|link={{{2|}}}]]
|[[{{{2|}}}]]
{{!}}[[{{{2|}}}]]
|-{{#if:{{{3|}}}||style="display: none"}}
}}
|[[File:White {{{3|}}}.png|x100px|link={{{3|}}}]]
 
|[[{{{3|}}}]]
{{#if:{{{3|}}}|{{!}}-
|-{{#if:{{{4|}}}||style="display: none"}}
{{!}}[[File:White {{{3|}}}.png|x100px|link={{{3|}}}]]
|[[File:White {{{4|}}}.png|x100px|link={{{4|}}}]]
{{!}}[[{{{3|}}}]]
|[[{{{4|}}}]]
|{{!}}style="display:none"{{!}}}}
|-{{#if:{{{5|}}}||style="display: none"}}
{{#if:{{{4|}}}|{{!}}[[File:White {{{4|}}}.png|x100px|link={{{4|}}}]]
|[[File:White {{{5|}}}.png|x100px|link={{{5|}}}]]
{{!}}[[{{{4|}}}]]
|[[{{{5|}}}]]
}}
|-{{#if:{{{6|}}}||style="display: none"}}
 
|[[File:White {{{6|}}}.png|x100px|link={{{6|}}}]]
{{#if:{{{5|}}}|{{!}}-
|[[{{{6|}}}]]
{{!}}[[File:White {{{5|}}}.png|x100px|link={{{5|}}}]]
|-{{#if:{{{7|}}}||style="display: none"}}
{{!}}[[{{{5|}}}]]
|[[File:White {{{7|}}}.png|x100px|link={{{7|}}}]]
|{{!}}style="display:none"{{!}}}}
|[[{{{7|}}}]]
{{#if:{{{6|}}}|{{!}}[[File:White {{{6|}}}.png|x100px|link={{{6|}}}]]
|-{{#if:{{{8|}}}||style="display: none"}}
{{!}}[[{{{6|}}}]]
|[[File:White {{{8|}}}.png|x100px|link={{{8|}}}]]
}}
|[[{{{8|}}}]]
 
|-{{#if:{{{9|}}}||style="display: none"}}
{{#if:{{{7|}}}|{{!}}-
|[[File:White {{{9|}}}.png|x100px|link={{{9|}}}]]
{{!}}[[File:White {{{7|}}}.png|x100px|link={{{7|}}}]]
|[[{{{9|}}}]]
{{!}}[[{{{7|}}}]]
|-{{#if:{{{10|}}}||style="display: none"}}
|{{!}}style="display:none"{{!}}}}
|[[File:White {{{10|}}}.png|x100px|link={{{10|}}}]]
{{#if:{{{8|}}}|{{!}}[[File:White {{{8|}}}.png|x100px|link={{{8|}}}]]
|[[{{{10|}}}]]
{{!}}[[{{{8|}}}]]
}}
 
{{#if:{{{9|}}}|{{!}}-
{{!}}[[File:White {{{9|}}}.png|x100px|link={{{9|}}}]]
{{!}}[[{{{9|}}}]]
|{{!}}style="display:none"{{!}}}}
{{#if:{{{10|}}}|{{!}}[[File:White {{{10|}}}.png|x100px|link={{{10|}}}]]
{{!}}[[{{{10|}}}]]
}}
 
{{#if:{{{11|}}}|{{!}}-
{{!}}[[File:White {{{11|}}}.png|x100px|link={{{11|}}}]]
{{!}}[[{{{11|}}}]]
|{{!}}style="display:none"{{!}}}}
{{#if:{{{12|}}}|{{!}}[[File:White {{{12|}}}.png|x100px|link={{{12|}}}]]
{{!}}[[{{{12|}}}]]
}}
|}</includeonly><noinclude>
|}</includeonly><noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Revision as of 00:18, 11 May 2026

Template documentation follows
Visit Template:Collection/doc to edit this documentation. (How does this work?)
Editors can experiment in this template's sandbox and test case pages.

Usage

Creates a table to showcase accessory collections. Images and names are linked to their respective pages. Accessory images are always the icon of the white color variant at a height of 100px.

Colors should be trimmed from an accessory name, otherwise the template will break.

  • No: {{Collection|Teal Gilded Helm}}
  • Yes: {{Collection|Gilded Helm}}

The template will break if not confined to a singular line as anonymous parameters preserve new-lines and white space. Limitations are detailed below.

Syntax

{{Collection|title=|}}

Examples

Functioning table:

Kickstarter Exclusive Accessories
Creeping Thicket Creeping Vine
Gilded Helm Iridescent Trail
Necromantic Cloak Protogear
Sacred Scepter



{{Collection|title=Kickstarter Exclusive Accessories|Creeping Thicket|Creeping Vine|Gilded Helm|Iridescent Trail|Necromantic Cloak|Protogear|Sacred Scepter}}

New lines and/or spaces will break the template:

Kickstarter Exclusive Accessories
[[File:White Creeping Thicket

.png|x100px|link=Creeping Thicket ]]

[[Creeping Thicket

]]

[[File:White Creeping Vine

.png|x100px|link=Creeping Vine ]]

[[Creeping Vine

]]

[[File:White Gilded Helm

.png|x100px|link=Gilded Helm ]]

[[Gilded Helm

]]

[[File:White Iridescent Trail

.png|x100px|link=Iridescent Trail ]]

[[Iridescent Trail

]]

[[File:White Necromantic Cloak

.png|x100px|link=Necromantic Cloak ]]

[[Necromantic Cloak

]]

[[File:White Protogear

.png|x100px|link=Protogear ]]

[[Protogear

]]

[[File:White Sacred Scepter

.png|x100px|link=Sacred Scepter ]]

[[Sacred Scepter

]]



{{Collection|title=Kickstarter Exclusive Accessories
|Creeping Thicket
|Creeping Vine
|Gilded Helm
|Iridescent Trail
|Necromantic Cloak
|Protogear
|Sacred Scepter
}}

Template Data

No description.

[Edit template data]

Template parameters

ParameterDescriptionTypeStatus
11

The first item in the collection. Currently supports up to 12 items in a singular table.

Unknownoptional
titletitle

Header text of the table, defaults to "See Also" if empty.

Default
See Also
Unknownoptional
collapsiblecollapsible

Adds class "mw-collapsible" to the table. Adds the ability to expand or close the table. The table is open by default.

Suggested values
true yes y
Unknownoptional
collapsedcollapsed

Adds classes "mw-collapsible" and "mw-collapsed". Adds the ability to expand or close the table. The table is closed by default.

Suggested values
true yes y
Unknownoptional