Changes
Template:Extension/TypeSwitch/doc (view source)
Revision as of 13:50, 16 November 2019
, 13:50, 16 November 2019better word
<noinclude>{{Documentation subpage}}
{{timw|Extension/TypeSwitch}}
</noinclude>
== Purpose ==
This template is a helper template for [[:Template:Extension]]. It takes an extension type as a parameter and creates the wiki markup associated with that type. If you would like to add a new type, please add it to this switch statement. Do not add it to the [[:Template:Extension]] directly.
== Usage ==
<nowiki>{{</nowiki>'''Extension/TypeSwitch'''|''type''}}
* ''type'' - a type. For allowed values, see documentation for [[:Template:Extension]]. In additional to the allowed values, two special values exist to facilitate the coding of [[Template:Extension]]:
** <code>_demomode_</code> - suppresses the addition of categories. The type name that should be displayed is passed as the second parameter, e.g. <code><nowiki>{{Extension/TypeSwitch|_demomode_|tag}}</nowiki></code>. [[Template:Extension]] uses this as its value when the template is in demo mode so that it doesn't add category links to the host page.
** <code>_missing_</code> - adds the host page to [[:Category:Extensions with invalid or missing type]] but does not display a label. [[Template:Extension]] uses this as its value when no type parameter was provided.
{{timw|Extension/TypeSwitch}}
</noinclude>
== Purpose ==
This template is a helper template for [[:Template:Extension]]. It takes an extension type as a parameter and creates the wiki markup associated with that type. If you would like to add a new type, please add it to this switch statement. Do not add it to the [[:Template:Extension]] directly.
== Usage ==
<nowiki>{{</nowiki>'''Extension/TypeSwitch'''|''type''}}
* ''type'' - a type. For allowed values, see documentation for [[:Template:Extension]]. In additional to the allowed values, two special values exist to facilitate the coding of [[Template:Extension]]:
** <code>_demomode_</code> - suppresses the addition of categories. The type name that should be displayed is passed as the second parameter, e.g. <code><nowiki>{{Extension/TypeSwitch|_demomode_|tag}}</nowiki></code>. [[Template:Extension]] uses this as its value when the template is in demo mode so that it doesn't add category links to the host page.
** <code>_missing_</code> - adds the host page to [[:Category:Extensions with invalid or missing type]] but does not display a label. [[Template:Extension]] uses this as its value when no type parameter was provided.