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 - "<!--T:(.*)-->" to "") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<languages/> | <languages/> | ||
− | </noinclude><includeonly>{{#switch: | + | </noinclude><includeonly>{{#switch: |
| = | | = | ||
{{#switch: {{lc: {{{1}}}}} | {{#switch: {{lc: {{{1}}}}} | ||
− | |ajax= | + | |ajax= [[w:AJAX|Ajax]][[Category:Ajax extensions{{#translation:}}]] |
− | |api={{ll|API:Main page| | + | |api={{ll|API:Main page| API}} [[Category:API extensions{{#translation:}}]] |
− | |beta feature={{ll|Beta Features| | + | |beta feature={{ll|Beta Features| Beta Feature}} [[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| Database}}[[Category:Database extensions{{#translation:}}]] |
− | |db= | + | |db= Database[[Category:Database extensions{{#translation:}}]] |
− | |data extraction= | + | |data extraction= Data extraction[[Category:Data extraction extensions{{#translation:}}]] |
− | |example= | + | |example= Example[[Category:Extensions examples{{#translation:}}]] |
− | |extended syntax={{ll|Manual:Extending wiki markup| | + | |extended syntax={{ll|Manual:Extending wiki markup| Extended syntax}}[[Category:Extended syntax extensions{{#translation:}}]] |
− | |filerepo= | + | |filerepo= File repository[[Category:File repository extensions{{#translation:}}]] |
− | |hook={{ll|Manual:Hooks| | + | |hook={{ll|Manual:Hooks| Hook}}[[Category:Hook extensions{{#translation:}}]] |
− | |interface= | + | |interface= User interface[[Category:User interface extensions{{#translation:}}]] |
− | |link={{ll|Manual:Extending wiki markup| | + | |link={{ll|Manual:Extending wiki markup| Link markup}}[[Category:Link markup extensions{{#translation:}}]] |
− | |media= | + | |media= Media[[Category:Media handling extensions{{#translation:}}]] |
− | |mywiki={{ll|Manual:Personalization| | + | |mywiki={{ll|Manual:Personalization| MyWiki}}[[Category:Personalization extensions{{#translation:}}]] |
− | |notify= | + | |notify= Notify[[Category:Notification extensions{{#translation:}}]] |
− | |page action={{ll|Manual:Parameters to index.php#Actions| | + | |page action={{ll|Manual:Parameters to index.php#Actions| Page action}}[[Category:Page action extensions{{#translation:}}]] |
− | |parser={{ll|Manual:Extending wiki markup| | + | |parser={{ll|Manual:Extending wiki markup| Parser extension}}[[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:}}]] |
Latest revision as of 14:27, 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.