Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Filter/doc: Difference between revisions

Template page
No edit summary
Template now works
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 15: Line 15:
<pre>
<pre>
{{Filter/Header|message=Click on the buttons to apply a filter to the list of [[creature]]s.}}
{{Filter/Header|message=Click on the buttons to apply a filter to the list of [[creature]]s.}}
{{Filter|category|Fish,Insects,Shore-Dwellers|Fish,Insects,Shore-Dwellers|}}
{{Filter|category|Fish,Insects,Shore-Dwellers|Fish,Insects,Shore-Dwellers}}
{{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 36: Line 37:
</pre>
</pre>
{{Filter/Header|message=Click on the buttons to apply a filter to the list of [[creature]]s.}}
{{Filter/Header|message=Click on the buttons to apply a filter to the list of [[creature]]s.}}
{{Filter|category|Fish,Insects,Shore-Dwellers|Fish,Insects,Shore-Dwellers|}}
{{Filter|category|Fish,Insects,Shore-Dwellers|Fish,Insects,Shore-Dwellers}}
{{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
}}
}}
|}
|}