Template:Filter/doc: Difference between revisions
Appearance
Creating Template:Filter/doc - Template doesn't work at the moment. Will figure out why later |
mNo edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation/Header}} | {{Documentation/Header}} | ||
{{Lua|FilterBuilder}} | {{Lua|FilterBuilder}} | ||
{{See also|Template:Search}} | |||
Template that creates filters for fiterable tables. To be used in conjuction with {{T|Filter/Header}} and {{T|Filter/Footer}}. | Template that creates filters for fiterable tables. To be used in conjuction with {{T|Filter/Header}} and {{T|Filter/Footer}}. | ||
| Line 13: | Line 13: | ||
==Example== | ==Example== | ||
{{Filter/Header| | <pre> | ||
{{Filter|category|Fish, | {{Filter/Header|[[creature]]s}} | ||
{{Filter|category|Fish,Insect,Shore-Dweller|Fish,Insect,Shore-Dweller}} | |||
{{Search|dataKey=name|placeholder=Search by creature}} | |||
{{Filter|reset}} | |||
{{Filter/Footer}} | |||
{| class="wikitable sortable" | |||
|- | |||
! Icon | |||
! Creature | |||
! Category | |||
{{#DPL: | |||
|namespace = | |||
|uses = Template:Creature Infobox | |||
|category = Creatures | |||
|include = {Creature Infobox}:name,{Creature Infobox}:category,{Creature Infobox}:name,{Creature Infobox}:category | |||
|format = ,,, | |||
|secseparators = <tr class="filter-element" data-name=",," data-category=",,"><td>[[File:%PAGE% Icon.png|x30px|link=%PAGE%]]</td><td>[[,,]]</td><td>,,</td></tr> | |||
|ordermethod = sortkey | |||
|count = 40 | |||
}} | |||
|} | |||
</pre> | |||
{{Filter/Header|[[creature]]s}} | |||
{{Filter|category|Fish,Insect,Shore-Dweller|Fish,Insect,Shore-Dweller}} | |||
{{Search|dataKey=name|placeholder=Search by creature}} | |||
{{Filter|reset}} | {{Filter|reset}} | ||
{{Filter/Footer}} | {{Filter/Footer}} | ||
| Line 23: | Line 47: | ||
! Category | ! Category | ||
{{#DPL: | {{#DPL: | ||
|namespace= | |namespace = | ||
|uses=Template:Creature Infobox | |uses = Template:Creature Infobox | ||
|category=Creatures | |category = Creatures | ||
|include={Creature Infobox}:name,{Creature Infobox}:category,{Creature Infobox}:name,{Creature Infobox}:category | |include = {Creature Infobox}:name,{Creature Infobox}:category,{Creature Infobox}:name,{Creature Infobox}:category | ||
|format=,,, | |format = ,,, | ||
|secseparators=<tr class="filter-element" data- | |secseparators = <tr class="filter-element" data-name=",," data-category=",,"><td>[[File:%PAGE% Icon.png|x30px|link=%PAGE%]]</td><td>[[,,]]</td><td>,,</td></tr> | ||
|ordermethod=sortkey | |ordermethod = sortkey | ||
|count=40 | |count = 40 | ||
}} | }} | ||
|} | |} | ||
Latest revision as of 13:46, 14 November 2025
This is the documentation page for Filter. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
See also: Template:Search
Template that creates filters for fiterable tables. To be used in conjuction with {{Filter/Header}} and {{Filter/Footer}}.
Usage[edit source]
{{Filter|<1>|<2>|<3>|<4>}}
This template has up to 4 unnamed parameters:
1— Name of data group being filtered. Required2/value— Comma separated list of possible values for the data group3/display— Comma separated list of corresponding displays for the values (e.g., an icon)4/default— Comma separated list of default applied filters
Example[edit source]
{{Filter/Header|[[creature]]s}}
{{Filter|category|Fish,Insect,Shore-Dweller|Fish,Insect,Shore-Dweller}}
{{Search|dataKey=name|placeholder=Search by creature}}
{{Filter|reset}}
{{Filter/Footer}}
{| class="wikitable sortable"
|-
! Icon
! Creature
! Category
{{#DPL:
|namespace =
|uses = Template:Creature Infobox
|category = Creatures
|include = {Creature Infobox}:name,{Creature Infobox}:category,{Creature Infobox}:name,{Creature Infobox}:category
|format = ,,,
|secseparators = <tr class="filter-element" data-name=",," data-category=",,"><td>[[File:%PAGE% Icon.png|x30px|link=%PAGE%]]</td><td>[[,,]]</td><td>,,</td></tr>
|ordermethod = sortkey
|count = 40
}}
|}
Click on the buttons or type in the provided search box below to apply a filter to the list of creatures.
| Icon | Creature | Category |
|---|---|---|
| Anchovy | Fish | |
| Angel Red Shrimp | Shore-Dweller | |
| Aurora Swallowtail | Insect | |
| Azure Metallic Hedge Blue | Insect | |
| Banded Coral Shrimp | Shore-Dweller | |
| Bay Salmon | Fish | |
| Bean-Shaped Fist Crab | Shore-Dweller | |
| Black Carp | Fish | |
| Black Chafer Beetle | Insect | |
| Black Crab | Shore-Dweller | |
| Black Tilapia | Fish | |
| Blackfin Pearlfish | Fish | |
| Blackspot Tuskfish | Fish | |
| Blue Blanquillo | Fish | |
| Blue Neon Cichlid | Fish | |
| Blue Tang | Fish | |
| Blue Trim Parrotfish | Fish | |
| Bluebottle | Insect | |
| Bluecheek Butterflyfish | Fish | |
| Bluelined Angelfish | Fish | |
| Bumblebee | Insect | |
| Butterfly Dragonfly | Insect | |
| Canary Wrasse | Fish | |
| Candy-Striped Shrimp | Shore-Dweller | |
| Coffee Clearwing Moth | Insect | |
| Constable Butterfly | Insect | |
| Crimson Marsh Glider | Insect | |
| Crimson Tip Butterfly | Insect | |
| Cushion Star | Shore-Dweller | |
| Dark Snakehead | Fish | |
| Deep-Sea Coral Crab | Shore-Dweller | |
| Elephant Hawk Moth | Insect | |
| Emperor Angelfish | Fish | |
| Empress Butterfly | Insect | |
| Fire Eel | Fish | |
| Fire Urchin | Shore-Dweller | |
| Firefly | Insect | |
| Five-Bar Swordtail | Insect | |
| Flat Rock Crab | Shore-Dweller | |
| Flat‑Clawed Hermit Crab | Shore-Dweller |