Template:Disambiguation: Difference between revisions

From Space Station 14 Wiki
defaultloadout-wikigg>Karmaworks
No edit summary
Aliser (talk | contribs)
depends on {{hatnote}}
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{Hatnote|<!--
<includeonly><!--
  -->{{#vardefine:topic|<!-- start vd
 
      -->{{#if:{{{topic|}}} | {{{topic}}} | {{PAGENAME}} }}<!-- end if
-->{{#vardefine:topic|<!-- start vd
  -->}}<!-- end vd
  -->{{#if:{{{topic|}}} | {{{topic}}} | {{PAGENAME}} }}<!-- end if
-->}}<!-- end vd
    
    
  -->{{#vardefine:disambig|<!-- start vd
-->{{#vardefine:disambig|<!-- start vd
    
    
      -->{{#if:{{{1|}}}<!-- start custom disambig if
  -->{{#if:{{{1|}}}<!-- start custom disambig if
        
        
        -->|{{{1}}}<!-- start label if -->{{#if:{{{2|}}} | {{!}}{{{2}}} }}<!-- end label if
      -->|{{{1}}}<!-- start label if -->{{#if:{{{2|}}} | {{!}}{{{2}}} }}<!-- end label if
          
          
        -->|{{#var:topic}} (disambiguation)<!-- else; use regular disambig
      -->|{{#var:topic}} (disambiguation)<!-- else; use regular disambig
          
          
      -->}}<!-- end custom disambig if
  -->}}<!-- end custom disambig if
        
        
  -->}}<!-- end vd
-->}}<!-- end vd
 
-->{{Hatnote|<!--


   -->This page is about {{#var:topic}}. For other uses, see [[{{#var:disambig}}]].<!--  
   -->This page is about '''{{#var:topic}}'''. For other uses, see [[{{#var:disambig}}]].<!--
  -->|icon=Disambig.svg<!--  
    
    
-->}}<!--  
-->}}<!--  
Line 22: Line 26:
--></includeonly><!--  
--></includeonly><!--  


--><noinclude>{{doc}}</noinclude>
--><noinclude>
{{doc|bb=
{{depends on template|Hatnote}}
}}
 
[[Category:Hatnote templates]]
[[Category:Template starter-kit]]
<templatedata>
{
"params": {
"1": {
"label": "Disambiguation Page",
"description": "A custom disambiguation page name.",
"example": "Disambiguation Page",
"type": "wiki-page-name"
},
"2": {
"label": "Link Label",
"description": "A label for the custom disambiguation page.",
"example": "Alternative Page Name",
"type": "line"
},
"topic": {
"label": "Custom Topic",
"description": "In case {{PAGENAME}} does not describe the topic, this can be used to display a custom topic",
"example": "a custom topic",
"default": "{{PAGENAME}}",
"type": "line"
}
},
"description": "This hatnote template is meant to be used at the top of an article to indicate the existence of a disambiguation page.",
"paramOrder": [
"1",
"2",
"topic"
],
"format": "inline"
}
</templatedata>
</noinclude>

Latest revision as of 00:33, 20 May 2025

Template documentation
view or edit this documentation about template documentation
Depends on template
This template depends on template:

Examples

Code Result
{{Disambiguation}}
This page is about Example. For other uses, see Example (disambiguation).
{{Disambiguation|Special:Random|topic=Example}}
This page is about Example. For other uses, see Special:Random.
{{Disambiguation|Special:Random|Page Label|topic=this particular topic}}
This page is about this particular topic. For other uses, see Page Label.

This hatnote template is meant to be used at the top of an article to indicate the existence of a disambiguation page.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Disambiguation Page1

A custom disambiguation page name.

Example
Disambiguation Page
Page nameoptional
Link Label2

A label for the custom disambiguation page.

Example
Alternative Page Name
Lineoptional
Custom Topictopic

In case {{PAGENAME}} does not describe the topic, this can be used to display a custom topic

Default
{{PAGENAME}}
Example
a custom topic
Lineoptional