Template:SameName: Difference between revisions
SimpleArrows (talk | contribs) mNo edit summary |
SimpleArrows (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly>:: [[File:Banner InfoIcon.png|17px|link=]] ''This article is about {{{1}}}. For {{{2}}}, see | <includeonly>:: [[File:Banner InfoIcon.png|17px|link=]] ''This article is about {{{1}}}. For {{{2}}}, see {{{3}}}.''</includeonly><noinclude>[[Category:Banner Templates]] | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 12: | Line 12: | ||
"2": { | "2": { | ||
"label": "Other Topic", | "label": "Other Topic", | ||
"description": "The topic of the other page with the same name. | "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", | ||
Line 18: | Line 18: | ||
}, | }, | ||
"3": { | "3": { | ||
"label": "Other Page Name", | "label": "Other Page Name(s)", | ||
"description": "The name of the other page. Make sure to include any | "description": "The name(s) of the other page(s). Make sure to include any extensions to the name such as parentheses.", | ||
"example": "Parker (Sector)", | "example": "[[Parker (Sector)]]", | ||
"type": "wiki-page-name", | "type": "wiki-page-name", | ||
"required": true | "required": true | ||
} | } | ||
}, | }, | ||
"description": "Creates text to show there is another page with the same name, although different topics. Place this at the top of the page, | "description": "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.", | ||
"format": "inline", | "format": "inline", | ||
"paramOrder": [ | "paramOrder": [ | ||
"1", | "1", | ||
"2", | "2", | ||
"3 | "3" | ||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
<pre>{{SameName|CURRENT_TOPIC|OTHER_TOPIC| | <pre>{{SameName|CURRENT_TOPIC|OTHER_TOPIC|OTHER_PAGE_NAMES}}</pre> | ||
'''Usage:''' | '''Usage:''' | ||
<pre>{{SameName|the character|the sector|Parker (Sector)}}</pre> | <pre>{{SameName|the character|the sector|[[Parker (Sector)]]}}</pre> | ||
'''Output:''' | '''Output:''' | ||
{{SameName|the character|the sector|Parker (Sector)}} | {{SameName|the character|the sector|[[Parker (Sector)]]}} | ||
'''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)]]}} | |||
Line 50: | Line 51: | ||
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|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}</pre> | ||
{{SameName|the character|the sector|Parker (Sector)#Background|Parker (Sector)}} | {{SameName|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 14:10, 7 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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Current Topic | 1 | 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.
| String | required |
Other Topic | 2 | The topic of the other page with the same name. If the topic has multiple pages, use (for example) "other games" for this parameter.
| String | required |
Other Page Name(s) | 3 | The name(s) of the other page(s). Make sure to include any extensions to the name such as parentheses.
| Page name | required |
{{SameName|CURRENT_TOPIC|OTHER_TOPIC|OTHER_PAGE_NAMES}}
Usage:
{{SameName|the character|the sector|[[Parker (Sector)]]}}
Output:
- This article is about the character. For the sector, see Parker (Sector).
Multiple pages:
If there are multiple pages with the same name, follow this example:
{{SameName|the weapon in [[Red Faction: Armageddon]]|other games|[[Assault Rifle]], [[Assault Rifle (RF2)]], or [[Assault Rifle (RF:G)]]}}
- This article is about the weapon in Red Faction: Armageddon. For other games, see Assault Rifle, Assault Rifle (RF2), or Assault Rifle (RF:G).
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|the character|the sector|[[Parker (Sector)#Background|Parker (Sector)]]}}
- 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.