Difference between revisions of "Template:Extension/TypeSwitch"
Jump to navigation
Jump to search
Joelmartin (talk | contribs) m (1 revision imported) |
Joelmartin (talk | contribs) m (Text replacement - "<translate>" to "") |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<languages/> | <languages/> | ||
− | </noinclude><includeonly>{{#switch: | + | </noinclude><includeonly>{{#switch:</translate> |
| = | | = | ||
{{#switch: {{lc: {{{1}}}}} | {{#switch: {{lc: {{{1}}}}} | ||
− | |ajax= | + | |ajax=<!--T:1--> [[w:AJAX|Ajax]]</translate>[[Category:Ajax extensions{{#translation:}}]] |
− | |api={{ll|API:Main page| | + | |api={{ll|API:Main page|<!--T:2--> API</translate>}} [[Category:API extensions{{#translation:}}]] |
− | |beta feature={{ll|Beta Features| | + | |beta feature={{ll|Beta Features|<!--T:3--> Beta Feature</translate>}} [[Category:Beta Feature extensions{{#translation:}}]] |
|contenthandler={{ll|Manual:ContentHandler|nsp=1}} [[Category:ContentHandler extensions{{#translation:}}]] | |contenthandler={{ll|Manual:ContentHandler|nsp=1}} [[Category:ContentHandler extensions{{#translation:}}]] | ||
− | |database={{ll|Manual:Database layout| | + | |database={{ll|Manual:Database layout|<!--T:4--> Database</translate>}}[[Category:Database extensions{{#translation:}}]] |
− | |db= | + | |db=<!--T:5--> Database</translate>[[Category:Database extensions{{#translation:}}]] |
− | |data extraction= | + | |data extraction=<!--T:6--> Data extraction</translate>[[Category:Data extraction extensions{{#translation:}}]] |
− | |example= | + | |example=<!--T:7--> Example</translate>[[Category:Extensions examples{{#translation:}}]] |
− | |extended syntax={{ll|Manual:Extending wiki markup| | + | |extended syntax={{ll|Manual:Extending wiki markup|<!--T:8--> Extended syntax</translate>}}[[Category:Extended syntax extensions{{#translation:}}]] |
− | |filerepo= | + | |filerepo=<!--T:9--> File repository</translate>[[Category:File repository extensions{{#translation:}}]] |
− | |hook={{ll|Manual:Hooks| | + | |hook={{ll|Manual:Hooks|<!--T:10--> Hook</translate>}}[[Category:Hook extensions{{#translation:}}]] |
− | |interface= | + | |interface=<!--T:11--> User interface</translate>[[Category:User interface extensions{{#translation:}}]] |
− | |link={{ll|Manual:Extending wiki markup| | + | |link={{ll|Manual:Extending wiki markup|<!--T:12--> Link markup</translate>}}[[Category:Link markup extensions{{#translation:}}]] |
− | |media= | + | |media=<!--T:13--> Media</translate>[[Category:Media handling extensions{{#translation:}}]] |
− | |mywiki={{ll|Manual:Personalization| | + | |mywiki={{ll|Manual:Personalization|<!--T:14--> MyWiki</translate>}}[[Category:Personalization extensions{{#translation:}}]] |
− | |notify= | + | |notify=<!--T:15--> Notify</translate>[[Category:Notification extensions{{#translation:}}]] |
− | |page action={{ll|Manual:Parameters to index.php#Actions| | + | |page action={{ll|Manual:Parameters to index.php#Actions|<!--T:16--> Page action</translate>}}[[Category:Page action extensions{{#translation:}}]] |
− | |parser={{ll|Manual:Extending wiki markup| | + | |parser={{ll|Manual:Extending wiki markup|<!--T:17--> Parser extension</translate>}}[[Category:Parser extensions{{#translation:}}]] |
|parser function={{ll|Manual:Parser functions|Parser function}}[[Category:Parser function extensions{{#translation:}}]] | |parser function={{ll|Manual:Parser functions|Parser function}}[[Category:Parser function extensions{{#translation:}}]] | ||
|pfunc={{ll|Manual:Parser functions|Parser functions}}[[Category:Parser function extensions{{#translation:}}]] | |pfunc={{ll|Manual:Parser functions|Parser functions}}[[Category:Parser function extensions{{#translation:}}]] |
Revision as of 03:55, 21 December 2019
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
{{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:
_demomode_
- suppresses the addition of categories. The type name that should be displayed is passed as the second parameter, e.g.{{Extension/TypeSwitch|_demomode_|tag}}
. 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._missing_
- 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.