Template:Filter/doc: Difference between revisions
Template page
More actions
No edit summary |
mNo edit summary |
||
| (2 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 14: | Line 14: | ||
==Example== | ==Example== | ||
<pre> | <pre> | ||
{{Filter/Header| | {{Filter/Header|[[creature]]s}} | ||
{{Filter|category|Fish, | {{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 27: | Line 28: | ||
|uses = Template:Creature Infobox | |uses = Template:Creature Infobox | ||
|category = Creatures | |category = Creatures | ||
|include = {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-category=",,"><td>[[File:%PAGE% Icon.png|x30px|link=%PAGE%]]</td><td>[[,,]]</td><td>,,</td></tr> | |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 | ||
| Line 35: | Line 36: | ||
|} | |} | ||
</pre> | </pre> | ||
{{Filter/Header| | {{Filter/Header|[[creature]]s}} | ||
{{Filter|category|Fish, | {{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 48: | Line 50: | ||
|uses = Template:Creature Infobox | |uses = Template:Creature Infobox | ||
|category = Creatures | |category = Creatures | ||
|include = {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-category=",,"><td>[[File:%PAGE% Icon.png|x30px|link=%PAGE%]]</td><td>[[,,]]</td><td>,,</td></tr> | |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 | ||
}} | }} | ||
|} | |} | ||