Template:Filter/Header: Difference between revisions
Updated |
m table -> id |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><div style="margin-top:1rem;">{{{message|Click on the '''buttons'''{{#ifeq:{{{no_search|}}}|1|| or type in the provided '''search box'''}} below to apply a | <includeonly><div style="margin-top:1rem;">{{{message|Click on the '''buttons'''{{#ifeq:{{{no_search|}}}|1|| or type in the provided '''search box'''}} below to apply a {{Color|help|filter}} to the list{{#if:{{{type|}}}| of {{{type}}}.|.}}}}}</div> | ||
<div class="filter-wrapper" data-table-id="{{{ | <div class="filter-wrapper" data-table-id="{{{id|}}}"></includeonly><noinclude>{{Documentation|type=Filter|content= | ||
Template that creates instructions and the div container for {{T|Filter}}. To be used in conjunction with {{T|Filter/Footer}}. | Template that creates instructions and the div container for {{T|Filter}}. To be used in conjunction with {{T|Filter/Footer}}. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="wikitext" copy> | <syntaxhighlight lang="wikitext" copy> | ||
{{Filter/Header| | {{Filter/Header|id=}} | ||
<Filterable table> | <Filterable table> | ||
{{Filter/Footer}} | {{Filter/Footer}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* {{F| | * {{F|id}} – Table ID of the filterable table. | ||
* {{F|type}} & | * {{F|type}} – Name of the filterable element. | ||
* {{F|no_search}} & | * {{F|no_search}} – Set to {{F|1}} to hide the search box message. | ||
* {{F|message}} & | * {{F|message}} – Customize the message. | ||
==Example== | ==Example== | ||
===Default=== | ===Default=== | ||
{{Example|<nowiki> | {{Example|<nowiki> | ||
{{Filter/Header| | {{Filter/Header|id=example-1}} | ||
{{Filter/Footer|no_results=1|no_search=1|no_reset=1}} | {{Filter/Footer|no_results=1|no_search=1|no_reset=1}} | ||
</nowiki>}} | </nowiki>}} | ||
| Line 23: | Line 23: | ||
===With Filterable Element=== | ===With Filterable Element=== | ||
{{Example|<nowiki> | {{Example|<nowiki> | ||
{{Filter/Header| | {{Filter/Header|id=example-2|no_search=1|type=neighbors}} | ||
{{Filter/Footer|no_results=1|no_search=1|no_reset=1}} | {{Filter/Footer|no_results=1|no_search=1|no_reset=1}} | ||
</nowiki>}} | </nowiki>}} | ||
| Line 29: | Line 29: | ||
===Custom Message=== | ===Custom Message=== | ||
{{Example|<nowiki> | {{Example|<nowiki> | ||
{{Filter/Header| | {{Filter/Header|id=example-3|message=Click on the buttons or type in the provided search box below to apply a filter to the list of neighbors. For example, typing in {{F|Wildgrass}} (case insensitive) in the search box will show all the neighbors that have either an interest or disinterest in {{Item|Wildgrass}}.}} | ||
{{Filter/Footer|no_results=1|no_search=1|no_reset=1}} | {{Filter/Footer|no_results=1|no_search=1|no_reset=1}} | ||
</nowiki>}} | </nowiki>}} | ||
}} | }} | ||