Template

WorldSwitch

From Dogcraft Wiki

(Indents! I'm getting lost in the labyrinth of my own system, and have a newfound respect for the people who make the formatting tools for well, everywhere.)
No edit summary
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{mode|}}}  
<includeonly>{{#switch: {{{mode|}}}  
| Category = {{#if: {{{1}}}  
| Category = {{#if: {{{2|}}}  
  |Survival 4
   |{{#switch: {{{1}}}  
   |{{#switch: {{{1}}}  
       | Survival = Survival
       | Survival = Survival
Line 18: Line 19:
       | Creative = Creative
       | Creative = Creative
       | MCMMO = MCMMO
       | MCMMO = MCMMO
       | {{{1}}}
       |}}
    }}
  |{{#if: {{{2|}}}|[[Survival 4]]|}}
  }}
  }}
| Subworld = {{#if: {{{2|}}}  
| Subworld = {{#if: {{{2|}}}  
Line 101: Line 100:


<code><nowiki>{{WorldSwitch|Survival 4 (Husky)|mode=Subworld}}</nowiki></code> generates: {{WorldSwitch|Survival 4 (Husky)|mode=Subworld}}
<code><nowiki>{{WorldSwitch|Survival 4 (Husky)|mode=Subworld}}</nowiki></code> generates: {{WorldSwitch|Survival 4 (Husky)|mode=Subworld}}
===Template data===
<templatedata>
{
"params": {
"1": {
"label": "World",
"description": "Input for the worlds, this is what actually matters the most. Takes inputs in most ways you could think to input the world that is not actually what the template wants. Except typos. This is to deal with alternative ways to say the same things, not the lack of autocorrect. ",
"type": "string",
"required": true
},
"2": {
"label": "Subworld",
"description": "Subworld for use in Survival 4 cases",
"example": "\"Husky\" or \"Beagle\"",
"type": "string",
"suggested": true
},
"mode": {
"label": "Mode",
"description": "Options are \"Category\" for world categoires, \"Network\" for use in the Network line of the Station infobox, and a currently unused \"Subworld\" option. ",
"type": "string"
}
},
"description": "This is a technical template. If you see this text outside the Template:WorldSwitch page, you are doing something wrong. \nIt is meant to convert most ways to input the 'world' property of infobox templates into what the template is expecting and/or the same thing but with a link to the actual world page referred to. ",
"format": "inline"
}
</templatedata>
</noinclude>

Revision as of 21:32, 22 July 2021


WorldSwitch template

This is a technical template meant to be used inside other template, mainly infoboxes. It converts server world names to include links. It handles most common ways of refering to past and present worlds.

Example

{{WorldSwitch|Survival}} generates: Survival

{{WorldSwitch|Survival 4}} generates:

{{WorldSwitch|Survival 4|Husky}} generates: Survival 4 (Husky)

{{WorldSwitch|Survival 4 (Husky)}} generates: Survival 4 (Husky)

{{WorldSwitch|Husky}} generates: Survival 4 (Husky)

{{WorldSwitch||Husky}} generates: Survival 4 (Husky)

{{WorldSwitch|Husky|mode=Category}} generates: Survival 4

{{WorldSwitch||Husky|mode=Category}} generates: Survival 4

{{WorldSwitch|Survival 4 (Husky)|mode=Category}} generates: Survival 4

{{WorldSwitch|Survival 4 (Husky)|mode=Subworld}} generates: Husky


Template data

This is a technical template. If you see this text outside the Template:WorldSwitch page, you are doing something wrong. It is meant to convert most ways to input the 'world' property of infobox templates into what the template is expecting and/or the same thing but with a link to the actual world page referred to.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
World1

Input for the worlds, this is what actually matters the most. Takes inputs in most ways you could think to input the world that is not actually what the template wants. Except typos. This is to deal with alternative ways to say the same things, not the lack of autocorrect.

Stringrequired
Subworld2

Subworld for use in Survival 4 cases

Example
"Husky" or "Beagle"
Stringsuggested
Modemode

Options are "Category" for world categoires, "Network" for use in the Network line of the Station infobox, and a currently unused "Subworld" option.

Stringoptional
This page was last modified on 22 July 2021, at 21:32. (3 months ago)