This is the documentation page for Module:Yesno
|This module is used in system messages. |
Changes to it can cause immediate changes to the Miraheze Meta user interface. To avoid large-scale disruption, any changes should first be tested in this module's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this module. Please discuss any changes on the talk page before implementing them.
|This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing.|
This module provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the
false boolean values, wikicode templates can only express boolean values through strings such as "yes", "no", etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also returns
nil values as
nil, to allow for distinctions between
false. The module also accepts other Lua structures as input, i.e. booleans, numbers, tables, and functions. If it is passed input that it does not recognise as boolean or
nil, it is possible to specify a default value to return.