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

Template:DropdownFilter/Option: Difference between revisions

Template page
(helper template for Template:DropdownFilter)
 
m (fix logic)
Line 1: Line 1:
<includeonly>["{{{1|}}}", "{{#ifeq:{{{2|}}}|disabled|true|{{{2|false}}}}}"]</includeonly><noinclude>
<includeonly>["{{{1|}}}", "{{#if:{{{2|}}}|disabled}}"]</includeonly><noinclude>
Creates the JSON for a specified option for [[Template:DropdownFilter]].
Creates the JSON for a specified option for [[Template:DropdownFilter]].


Line 6: Line 6:
{{DropdownFilter/Option
{{DropdownFilter/Option
   | selection-option
   | selection-option
   | disabled (optional, set it to "disabled" or "true" to disable the selection option; false by default))
   | disabled (optional, put any value to disable the option))
}}
}}
</nowiki></pre>
</nowiki></pre>
Line 17: Line 17:
| {{DropdownFilter/Option|BBCS}}
| {{DropdownFilter/Option|BBCS}}
|-
|-
| <code><nowiki>{{DropdownFilter/Option|BBCS|disabled}}</nowiki></code>
| <code><nowiki>{{DropdownFilter/Option|BBCS|anything}}</nowiki></code>
| {{DropdownFilter/Option|BBCS|disabled}}
| {{DropdownFilter/Option|BBCS|anything}}
|-
| <code><nowiki>{{DropdownFilter/Option|BBCS|true}}</nowiki></code>
| {{DropdownFilter/Option|BBCS|true}}
|}
|}


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 23:29, 17 October 2018

Creates the JSON for a specified option for Template:DropdownFilter.

Usage

{{DropdownFilter/Option
  | selection-option
  | disabled (optional, put any value to disable the option))
}}
Code Produces
{{DropdownFilter/Option|BBCS}} ["BBCS", ""]
{{DropdownFilter/Option|BBCS|anything}} ["BBCS", "disabled"]