Template:Disamb: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
Cleaning up documentation, making mroe straightforward
Tigerpaw28 (talk | contribs)
mNo edit summary
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<includeonly>*'''{{{y|{{{2|????}}}}}}''' — {{{1|}}}</includeonly><noinclude>
<includeonly>*'''{{#ifeq: {{{y|{{{2|}}}}}}|none|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|{{{y|{{{2|????}}}}}}}}''' — {{{1|}}}</includeonly><noinclude>
__NOTOC__
==Description==
'''<tt><nowiki>{{</nowiki>disamb}}</tt>''' is a simple template used in [[Help:Disambiguation|disambiguation]] articles. It creates a listing preceded by the ''year this character first appeared'', making extremely long disambig pages such as [[Prowl (disambiguation)]] easier to navigate. It should only be used when listing fictional appearances. Real world entities should use a simple bulletpoint.
==Usage==
===Parameters===
====Required====
The first parameter of this template is an anonymous one that represents the main text of the bulletpoint. This should always be provided.
====Optional====
Optionally, a year can be provided. The year can be set using either through the named parameter "y=", or by making the year the ''second'' parameter.
 
<tt>'''<nowiki>{{</nowiki>disamb |y=YEAR |Character Description }}<br/>
'''<nowiki>{{</nowiki>disamb |Character Description |YEAR }}<br/>
'''<nowiki>{{</nowiki>disamb |Character Description |y=YEAR }}</tt>'''
 
The 3 above formats are functionally equivalent.  This allows for the easy conversion of un-templated disambig pages (without tracking down years) while also permitting the use of a 'logical' layout with the year in front. (Mimicking layout order.)
 
If no year is provided, the template displays ???? in place of a year.
===Code===
<pre>{{Disamb
<pre>{{Disamb
|Description (String)
|Description (String)
Line 7: Line 25:
</pre>
</pre>


'''<tt><nowiki>{{</nowiki>disamb}}</tt>''' is a simple template used in [[Project:disambiguation|disambiguation]] pages.  It creates a listing preceded by the ''year this character first appeared'', making extremely long disambig pages such as [[Prowl (disambiguation)]] easier to navigate.
==Examples==
===Code===
<pre>
{{disamb|y=[[2001]]|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.}}
</pre>
===Result===
{{disamb|y=[[2001]]|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.}}


{| class="wikitable" style="width:100%;"
===Code===
|-
<pre>
| style="width:45%;"|'''<tt><nowiki>{{disamb |y=1996 |Character A from Series B}}</nowiki></tt>
{{disamb|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.|2001}}
| style="text-align:center;"| →
</pre>
| style="width:45%;"| {{disamb |Character A from Series B | 1996}}
===Result===
|}
{{disamb|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.|2001}}


The year can be set using either through the [[Project:Using Templates|named term]] "y=", or by making the year the ''second'' term.
===Code===
 
<pre>
<tt>'''<nowiki>{{</nowiki>disamb |y=YEAR |Character Description }}<br/>
{{disamb|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.}}
'''<nowiki>{{</nowiki>disamb |Character Description |YEAR }}<br/>
</pre>
'''<nowiki>{{</nowiki>disamb |Character Description |y=YEAR }}</tt>'''
===Result===
 
{{disamb|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.}}
The 3 above formats are functionally equivalent.  This allows for the easy conversion of un-templated disambig pages (without tracking down years) while also permitting the use of a 'logical' layout with the year in front. (Mimicking layout order.)
 
If no year is provided, the template displays ???? in place of a year.
'''<nowiki>{{</nowiki>disamb |Character Description }}<br/>
{{disamb |Character Description }}


[[Category: Templates]]
[[Category: Disambiguation templates| ]]
</noinclude>
</noinclude>

Latest revision as of 04:18, 12 June 2022


Description

[edit]

{{disamb}} is a simple template used in disambiguation articles. It creates a listing preceded by the year this character first appeared, making extremely long disambig pages such as Prowl (disambiguation) easier to navigate. It should only be used when listing fictional appearances. Real world entities should use a simple bulletpoint.

Usage

[edit]

Parameters

[edit]

Required

[edit]

The first parameter of this template is an anonymous one that represents the main text of the bulletpoint. This should always be provided.

Optional

[edit]

Optionally, a year can be provided. The year can be set using either through the named parameter "y=", or by making the year the second parameter.

{{disamb |y=YEAR |Character Description }}
{{disamb |Character Description |YEAR }}
{{disamb |Character Description |y=YEAR }}

The 3 above formats are functionally equivalent. This allows for the easy conversion of un-templated disambig pages (without tracking down years) while also permitting the use of a 'logical' layout with the year in front. (Mimicking layout order.)

If no year is provided, the template displays ???? in place of a year.

Code

[edit]
{{Disamb
|Description (String)
|YEAR #### (if not set '????')
|y=YEAR #### (same as previous)
}}

Examples

[edit]

Code

[edit]
{{disamb|y=[[2001]]|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.}}

Result

[edit]

Code

[edit]
{{disamb|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.|2001}}

Result

[edit]

Code

[edit]
{{disamb|[[Wind Sheer (RID)|Wind Sheer]], the [[Decepticon]] jet from the 2001 ''[[Transformers: Robots in Disguise (2001 franchise)|Robots in Disguise]]'' franchise.}}

Result

[edit]