Template:Minecraft Wiki link: Difference between revisions
(Created page with "[https://minecraft.fandom.com/{{#switch:{{{3|en}}}|en=| #default={{{3}}}/}}wiki/{{{1|Minecraft}}}{{#switch:{{{3}}}|zh={{#switch:{{{4}}}|=|zh=?variant=zh|cn=?variant=zh-cn|hk=?variant=zh-hk|tw=?variant=zh-tw|#default=}}|#default=}} {{#switch:{{{2}}}|={{{1}}}| #default={{{2|{{{1|Minecraft}}}}}}}}] <noinclude> This template allows users to quickly create a hyperlink to [https://minecraft.fandom.com/wiki/ Minecraft Wiki]. It can be abbreviated as '''<nowiki>{{mcwiki link}}<...") |
m (add note) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[https://minecraft.fandom.com/{{#switch:{{{3|en}}}|en=| #default={{{3}}}/}}wiki/{{{1|Minecraft}}}{{#switch:{{{3}}}|zh={{#switch:{{{4}}}|=|zh=?variant=zh|cn=?variant=zh-cn|hk=?variant=zh-hk|tw=?variant=zh-tw|#default=}}|#default=}} {{#switch:{{{2}}}|={{{1}}}| #default={{{2|{{{1|Minecraft}}}}}}}}] | [https://minecraft.fandom.com/{{#switch:{{{3|en}}}|en=| #default={{{3}}}/}}wiki/{{{1|Minecraft}}}{{#switch:{{{3}}}|zh={{#switch:{{{4}}}|=|zh=?variant=zh|cn=?variant=zh-cn|hk=?variant=zh-hk|tw=?variant=zh-tw|#default=}}|#default=}} {{#switch:{{{2}}}|={{{1|Minecraft}}}| #default={{{2|{{{1|Minecraft}}}}}}}}]<noinclude><br> | ||
<noinclude> | |||
This template allows users to quickly create a hyperlink to [https://minecraft.fandom.com/wiki/ Minecraft Wiki]. | This template allows users to quickly create a hyperlink to [https://minecraft.fandom.com/wiki/ Minecraft Wiki]. | ||
It can be abbreviated as '''<nowiki>{{mcwiki link}}</nowiki>'''. | It can be abbreviated as '''<nowiki>{{mcwiki link}}</nowiki>'''. | ||
'''Note: If the page name has spaces, please use the underscore "_" instead. If you do not want to display the underscore, please use the parameter 2''' | |||
== Usage == | == Usage == | ||
<code><nowiki>{{Minecraft Wiki link|1|2|3|4}}</nowiki></code> or <code><nowiki>{{mcwiki link|1|2|3|4}}</nowiki></code>. | <code><nowiki>{{Minecraft Wiki link|1|2|3|4}}</nowiki></code> or <code><nowiki>{{mcwiki link|1|2|3|4}}</nowiki></code>. | ||
Line 113: | Line 114: | ||
{{mcwiki link|Зомби|pls don't do like this|ru|hk}} | {{mcwiki link|Зомби|pls don't do like this|ru|hk}} | ||
''The effect of this version is the same as that of the version without parameter 4 (''<code><nowiki>{{mcwiki link|Зомби|it's an error|ru}}</nowiki></code>''), except that 3 bytes are wasted.'' | ''The effect of this version is the same as that of the version without parameter 4 (''<code><nowiki>{{mcwiki link|Зомби|it's an error|ru}}</nowiki></code>''), except that 3 bytes are wasted.''</noinclude> | ||
</noinclude> |
Latest revision as of 16:42, 29 December 2022
Minecraft
This template allows users to quickly create a hyperlink to Minecraft Wiki.
It can be abbreviated as {{mcwiki link}}.
Note: If the page name has spaces, please use the underscore "_" instead. If you do not want to display the underscore, please use the parameter 2
Usage
{{Minecraft Wiki link|1|2|3|4}}
or {{mcwiki link|1|2|3|4}}
.
Templates | Description | Default | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Required. Page name in Minecraft Wiki | Minecraft | |||||||||||||||||||||||||||||||||||||||
2 | Optional. Displayed text. If nothing is filled in, it is the same as 1. | 1 | |||||||||||||||||||||||||||||||||||||||
3 | Optional, specify the Minecraft Wiki in a specific language, and the default is en. The content filled in must be the abbreviation of the language name in the following table, otherwise it is invalid.
|
en | |||||||||||||||||||||||||||||||||||||||
4 | Optional. It only takes effect when parameter 3 is "zh", which is used to specify whether the page is in simplified Chinese or traditional Chinese. The available keywords are shown in the following table. All other characters are regarded as No characters filled by default.
|
Example 1 - Use parameter 1 only
{{mcwiki link|zombie}}
Effect
Example 2 - Use parameter 2
{{mcwiki link|zombie|my good friend}}
Effect
Example 3 - Use parameter 3 but not parameter 2
{{mcwiki link|좀비||ko}}
Effect
좀비Example of use of parameter 4.
Example 4 - Use all parameters except parameter 4
{{mcwiki link|ゾンビ|Zombie's Japanese Minecraft Wiki page|ja}}
Effect
Zombie's Japanese Minecraft Wiki page
Example 5 - Example of use of parameter 4
{{mcwiki link|殭屍|僵尸在台灣のMinecraft Wiki page|zh|tw}}
Effect
Example 5.1 - Parameter 3 is "zh" but parameter 4 is not used
{{mcwiki link|僵尸|Chinese Zombie|zh}}{{mcwiki link|殭屍|Not HK Zombie|zh}}←''Although parameter 1 is written in traditional characters, it still jumps to the default no conversion page due to the lack of parameter 4.''
Effect 5.1
Chinese ZombieNot HK Zombie←Although parameter 1 is written in traditional characters, it still jumps to the default no conversion page due to the lack of parameter 4.
Example 5.2 - Error example: Parameter 4 exists but parameter 3 is not "zh"
{{mcwiki link|Зомби|it's an error|ru|hk}}
Effect 5.2
The effect of this version is the same as that of the version without parameter 4 ({{mcwiki link|Зомби|it's an error|ru}}
), except that 3 bytes are wasted.