Template:Filter/Header: Difference between revisions

mNo edit summary
m table -> id
 
Line 1: Line 1:
<includeonly><div style="margin-top:1rem;">{{{message|Click on the '''buttons'''{{#ifeq:{{{no_search|}}}|1||&nbsp;or type in the provided '''search box'''}} below to apply a {{Color|help|filter}} to the list{{#if:{{{type|}}}|&nbsp;of {{{type}}}.|.}}}}}</div>
<includeonly><div style="margin-top:1rem;">{{{message|Click on the '''buttons'''{{#ifeq:{{{no_search|}}}|1||&nbsp;or type in the provided '''search box'''}} below to apply a {{Color|help|filter}} to the list{{#if:{{{type|}}}|&nbsp;of {{{type}}}.|.}}}}}</div>
<div class="filter-wrapper" data-table-id="{{{table|}}}"></includeonly><noinclude>{{Documentation|type=Filter|content=
<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|table=}}
{{Filter/Header|id=}}
<Filterable table>
<Filterable table>
{{Filter/Footer}}
{{Filter/Footer}}
</syntaxhighlight>
</syntaxhighlight>
* {{F|table}} &mdash; Table ID of filterable table.
* {{F|id}} &ndash; Table ID of the filterable table.
* {{F|type}} &mdash; Name of the filterable element.
* {{F|type}} &ndash; Name of the filterable element.
* {{F|no_search}} &mdash; Set to {{F|1}} to hide the search box message.
* {{F|no_search}} &ndash; Set to {{F|1}} to hide the search box message.
* {{F|message}} &mdash; Customize the message.
* {{F|message}} &ndash; Customize the message.


==Example==
==Example==
===Default===
===Default===
{{Example|<nowiki>
{{Example|<nowiki>
{{Filter/Header|table=example-1}}
{{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|table=example-2|no_search=1|type=neighbors}}
{{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|table=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/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>}}
}}
}}