Template:SameName: Difference between revisions

From Red Faction Wiki
mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly>:: [[File:Banner InfoIcon.png|17px|link=]] ''This article is about {{{1}}}. For {{{2}}}, see {{{3}}}.''</includeonly><noinclude>[[Category:Banner Templates]]
<includeonly>:: [[File:Banner InfoIcon.png|17px|link=]] ''{{#switch: {{{1|}}}
| single = This article is about {{{2}}}. For {{{3}}}, see {{{4}}}.
| multi = For other similarly named articles, see {{{2}}}.
}}''</includeonly><noinclude>[[Category:Banner Templates]]
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"1": {
"1": {
"label": "Current Topic",
"label": "Type",
"description": "The topic of the current page. It is advised to use \"the\" before writing the topic unless there is a case it isn't needed.",
"description": "Type of SameName being used. Use \"single\" if there is only one (1) page with the same name. Use \"multi\" if there are multiple pages with the same name.",
"type": "string",
"type": "string",
"example": "the character",
"example": "single",
"required": true
"required": true,
"suggestedvalues": [
"single",
"multi"
]
},
},
"2": {
"2": {
"label": "Other Topic",
"label": "SINGLE: Current Topic // MULTI: Other Page",
"description": "SINGLE: The topic of the current page. It is advised to use \"the\" before writing the topic unless there is a case it isn't needed. // MULTI: Links to the other pages with the same name. ",
"example": "SINGLE: the character // MULTI: [[Assault Rifle (RF2)]], [[Assault Rifle (RF:G)]], or [[Assault Rifle (RF:A)]]",
"type": "string"
},
"3": {
"label": "Other Topic (SINGLE only)",
"description": "The topic of the other page with the same name. If the topic has multiple pages, use (for example) \"other games\" for this parameter.",
"description": "The topic of the other page with the same name. If the topic has multiple pages, use (for example) \"other games\" for this parameter.",
"example": "the sector",
"example": "the sector",
"type": "string",
"type": "string"
"required": true
},
},
"3": {
"4": {
"label": "Other Page Name(s)",
"label": "Other Page (SINGLE only)",
"description": "The name(s) of the other page(s). Make sure to include any extensions to the name such as parentheses.",
"description": "A link to the other page with the same name. Make sure to include any extensions to the name such as parentheses.",
"example": "[[Parker (Sector)]]",
"example": "[[Parker (Sector)]]",
"type": "wiki-page-name",
"type": "string"
"required": true
}
}
},
},
Line 30: Line 41:
"1",
"1",
"2",
"2",
"3"
"3",
"4"
]
]
}
}
</templatedata>
</templatedata>
<pre>{{SameName|CURRENT_TOPIC|OTHER_TOPIC|OTHER_PAGE_NAMES}}</pre>
<pre>{{SameName|single|CURRENT_TOPIC|OTHER_TOPIC|OTHER_PAGE_LINKS}}
{{SameName|multi|OTHER_PAGE_LINKS}}</pre>
'''Usage:'''
'''Usage:'''
<pre>{{SameName|the character|the sector|[[Parker (Sector)]]}}</pre>
<pre>{{SameName|single|the character|the sector|[[Parker (Sector)]]}}
{{SameName|multi|[[Assault Rifle (RF2)]], [[Assault Rifle (RF:G)]], or [[Assault Rifle (RF:A)]]}}</pre>
'''Output:'''
'''Output:'''
{{SameName|the character|the sector|[[Parker (Sector)]]}}
{{SameName|single|the character|the sector|[[Parker (Sector)]]}}
 
{{SameName|multi|[[Assault Rifle (RF2)]], [[Assault Rifle (RF:G)]], or [[Assault Rifle (RF:A)]]}}
 
'''Multiple pages:'''
 
If there are multiple pages with the same name, follow this example:
<pre>{{SameName|the weapon in [[Red Faction: Armageddon]]|other games|[[Assault Rifle]], [[Assault Rifle (RF2)]], or [[Assault Rifle (RF:G)]]}}</pre>
{{SameName|the weapon in [[Red Faction: Armageddon]]|other games|[[Assault Rifle]], [[Assault Rifle (RF2)]], or [[Assault Rifle (RF:G)]]}}
 


'''Linking a section from a page:'''
'''Linking a section from a page:'''


If the other topic is within a section under a heading, you can add a hashtag and the name of the heading in front of the page's name, for example:
If the other topic is within a section under a heading, you can add a hashtag and the name of the heading in front of the page's name, for example:
<pre>{{SameName|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}</pre>
<pre>{{SameName|single|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}</pre>
{{SameName|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}
{{SameName|single|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}
Be sure to use the display label parameter to make the link appear as the page name.
Be sure to use the display label parameter to make the link appear as the page name.
</noinclude>
</noinclude>

Revision as of 02:15, 23 February 2024

Creates text to show there is another page with the same name, although different topics. Place this at the top of the page, under any infoboxes or BubbleNav templates.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type1

Type of SameName being used. Use "single" if there is only one (1) page with the same name. Use "multi" if there are multiple pages with the same name.

Suggested values
single multi
Example
single
Stringrequired
SINGLE: Current Topic // MULTI: Other Page2

SINGLE: The topic of the current page. It is advised to use "the" before writing the topic unless there is a case it isn't needed. // MULTI: Links to the other pages with the same name.

Example
SINGLE: the character // MULTI: [[Assault Rifle (RF2)]], [[Assault Rifle (RF:G)]], or [[Assault Rifle (RF:A)]]
Stringoptional
Other Topic (SINGLE only)3

The topic of the other page with the same name. If the topic has multiple pages, use (for example) "other games" for this parameter.

Example
the sector
Stringoptional
Other Page (SINGLE only)4

A link to the other page with the same name. Make sure to include any extensions to the name such as parentheses.

Example
[[Parker (Sector)]]
Stringoptional
{{SameName|single|CURRENT_TOPIC|OTHER_TOPIC|OTHER_PAGE_LINKS}}
{{SameName|multi|OTHER_PAGE_LINKS}}

Usage:

{{SameName|single|the character|the sector|[[Parker (Sector)]]}}
{{SameName|multi|[[Assault Rifle (RF2)]], [[Assault Rifle (RF:G)]], or [[Assault Rifle (RF:A)]]}}

Output:

Banner InfoIcon.png This article is about the character. For the sector, see Parker (Sector).
Banner InfoIcon.png For other similarly named articles, see Assault Rifle (RF2), Assault Rifle (RF:G), or Assault Rifle (RF:A).

Linking a section from a page:

If the other topic is within a section under a heading, you can add a hashtag and the name of the heading in front of the page's name, for example:

{{SameName|single|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}
Banner InfoIcon.png This article is about the character. For the sector, see Parker (Sector).

Be sure to use the display label parameter to make the link appear as the page name.