Template:SubnauticaLink/doc: Difference between revisions

From Subnautica Wiki
(hope this is good.)
Tag: 2017 source edit
 
(Updated the documentation)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Template used for linking to related articles on the ''Subnautica:Below Zero'' wiki.
Input: <nowiki>{{SubnauticaLink|Batteries|Battery}}</nowiki><br/>

==Usage==
===Using the parameters===
Input: <pre><nowiki>{{SubnauticaLink|Stalker|Flashlight|Below Zero)}}</nowiki></pre>
Output:
Output:
{{SubnauticaLink|Batteries|Battery}}
{{SubnauticaLink|Stalker|Flashlight}}
===Placed on a ''Below Zero'' article===
* First parameter: This parameter decides how the text in the first sentence is displayed, in between the lines "This article is about" and "in ''Subnautica''". If left blank or unspecified, the page name in its entirety will be inserted into this space. If the default page name does not make grammatical sense in the sentence naturally, insert the page name into this parameter in an altered form, like above. Words other than the page name can be inserted here if need be.
Input on [[Chinese Potato (Below Zero)]]:<pre><nowiki>{{SubnauticaLink}}</nowiki></pre>
* Second Parameter: This parameter decides what the "'''here'''" in the second sentence links to. If left blank or undefined it will link to a page on the ''Subnautica: Below Zero'' wiki that has the exact same name as the current article, and will do so regardless of whether that page exists or not. If the name of the similar article on the ''Below Zero'' wiki is different than that of the article being edited, then that name must be entered in the second parameter ''exactly'' as it is displayed on the ''Below Zero'' wiki.
Output on [[Chinese Potato (Below Zero)]]:
===Placed on a ''Subnautica'' article===
{{SubnauticaLink|Chinese Potato|Chinese Potato (Subnautica)|Below Zero)}}
Input on [[Chinese Potato (Subnautica)]]:<pre><nowiki>{{SubnauticaLink}}</nowiki></pre>
Output on [[Chinese Potato (Subnautica)]]:
{{SubnauticaLink|Chinese Potato|Chinese Potato (Below Zero)|text}}
===Parameters===
Note: the parameters only need to be defined when their default behaviors are not wanted. In most cases, the default behaviors are correct, so the parameters are usually not needed.
* First Parameter: This parameter decides what the text after "This article is about" is. By default, this is the name of the article without the parenthetical note at the end (e.g., on '''Chinese Potato (Below Zero)''', the text would be "Chinese Potato").
* Second Parameter: This parameter decides where '''here''' at the end of the template links to. By default, the template takes the current article's name, replaces (Below Zero) with (Subnautica) or vice versa, and links to that new article (e.g., on '''Chinese Potato (Below Zero)''', it would link to '''Chinese Potato (Subnautica)''').
* Third Parameter: This parameter controls when ''Subnautica'' and ''Below Zero'' appear in the template. By default, the template does this automatically based on the current article's name (e.g., on '''Chinese Potato (Subnautica)''', it would say, ". . . as it appears in ''Subnautica''. To see this subject as it appears in ''Below Zero'' . . .).
<templatedata>
{
"params": {
"1": {
"label": "The current article's name",
"description": "Specify the name of the current article",
"example": "Chinese Potato",
"type": "string",
"default": "Removes (Subnautica) or (Below Zero) from the end of the current article's name"
},
"2": {
"label": "The other article's name",
"description": "Specify the name of the other game's article",
"example": "Chinese Potato (Below Zero)",
"type": "string",
"default": "Replaces (Subnautica) with (Below Zero) or vice versa for the current article's name and links to that new article name"
},
"3": {
"label": "Current Game Name",
"description": "Unnecessary if the articles end in (Below Zero) and (Subnautica) correctly; otherwise, write \"Below Zero)\" if this article is about Below Zero or any other text if it is not",
"example": "Below Zero), anyrandomtext",
"type": "string",
"default": "Writes \"as it appears in Subnautica\" or \"as it appears in Below Zero\" as appropriate"
}
},
"description": "This template is put on articles that have a different article for the different games. If the articles have the same name, parameters 1 and 2 are unncessary; if they both use (Subnautica) and (Below Zero), parameter 3 is unnecessary.",
"paramOrder": [
"1",
"2",
"3"
],
"format": "inline"
}
</templatedata>

Latest revision as of 18:48, 18 August 2021

Template used for linking to related articles on the Subnautica:Below Zero wiki.

Usage

Using the parameters

Input:

{{SubnauticaLink|Stalker|Flashlight|Below Zero)}}

Output:

This article is about Stalker in Subnautica. Click here for information on this subject in Below Zero.

Placed on a Below Zero article

Input on Chinese Potato (Below Zero):

{{SubnauticaLink}}

Output on Chinese Potato (Below Zero):

Placed on a Subnautica article

This article is about Chinese Potato in Below Zero. Click here for information on this subject in Subnautica.

Input on Chinese Potato (Subnautica):

{{SubnauticaLink}}

Output on Chinese Potato (Subnautica):

This article is about Chinese Potato in Subnautica. Click here for information on this subject in Below Zero.

Parameters

Note: the parameters only need to be defined when their default behaviors are not wanted. In most cases, the default behaviors are correct, so the parameters are usually not needed.

  • First Parameter: This parameter decides what the text after "This article is about" is. By default, this is the name of the article without the parenthetical note at the end (e.g., on Chinese Potato (Below Zero), the text would be "Chinese Potato").
  • Second Parameter: This parameter decides where here at the end of the template links to. By default, the template takes the current article's name, replaces (Below Zero) with (Subnautica) or vice versa, and links to that new article (e.g., on Chinese Potato (Below Zero), it would link to Chinese Potato (Subnautica)).
  • Third Parameter: This parameter controls when Subnautica and Below Zero appear in the template. By default, the template does this automatically based on the current article's name (e.g., on Chinese Potato (Subnautica), it would say, ". . . as it appears in Subnautica. To see this subject as it appears in Below Zero . . .).

This template is put on articles that have a different article for the different games. If the articles have the same name, parameters 1 and 2 are unncessary; if they both use (Subnautica) and (Below Zero), parameter 3 is unnecessary.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
The current article's name1

Specify the name of the current article

Default
Removes (Subnautica) or (Below Zero) from the end of the current article's name
Example
Chinese Potato
Stringoptional
The other article's name2

Specify the name of the other game's article

Default
Replaces (Subnautica) with (Below Zero) or vice versa for the current article's name and links to that new article name
Example
Chinese Potato (Below Zero)
Stringoptional
Current Game Name3

Unnecessary if the articles end in (Below Zero) and (Subnautica) correctly; otherwise, write "Below Zero)" if this article is about Below Zero or any other text if it is not

Default
Writes "as it appears in Subnautica" or "as it appears in Below Zero" as appropriate
Example
Below Zero), anyrandomtext
Stringoptional