Template:Disamb: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
Tweaking the unnecessarily long documentation
Derik (talk | contribs)
Cleaning up documentation, making mroe straightforward
Line 7: Line 7:
</pre>
</pre>


'''Template:Disamb''' is a simple template designed to aid in the layout of [[Project:disambiguation|disambiguation]] pages.
'''<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.


<tt>'''<nowiki>{{disamb}}</nowiki>'''</tt> creates a listing preceded by the year this character first appeared (making extremely long disambig pages such as [[Prowl (disambiguation)]]) easier to navigate.
{| class="wikitable" style="width:100%;"
 
|-
Example:
| style="width:45%;"|'''<tt><nowiki>{{disamb |y=1996 |Character A from Series B}}</nowiki></tt>
 
| style="text-align:center;"| →
'''<tt><nowiki>{{</nowiki>disamb<br/>
| style="width:45%;"| {{disamb |Character A from Series B | 1996}}
'''|y=1984<br/>
|}
'''|<nowiki>[[Prowl (G1)|Prowl]] the [[Autobot]] police car (and later [[Maximal]] lion) from [[Generation 1]]</nowiki><br/>
'''}}</tt>
 
{{disamb
|y=1984
|[[Prowl (G1)|Prowl]] the [[Autobot]] police car (and later [[Maximal]] lion) from [[Generation 1]]
}}


The year can be set using either through the [[Project:Using Templates|named term]] "y=", or by making the year the ''second'' term.
The year can be set using either through the [[Project:Using Templates|named term]] "y=", or by making the year the ''second'' term.
Line 29: Line 22:
'''<nowiki>{{</nowiki>disamb |Character Description |y=YEAR }}</tt>'''
'''<nowiki>{{</nowiki>disamb |Character Description |y=YEAR }}</tt>'''


All 3 formats are functional equivalent.  This allows for the quick 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.)
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.
If no year is provided, the template displays ???? in place of a year.

Revision as of 12:17, 4 January 2008

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

{{disamb}} is a simple template used in 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.

{{disamb |y=1996 |Character A from Series B}}
  • 1996 — Character A from Series B

The year can be set using either through the named term "y=", or by making the year the second term.

{{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. {{disamb |Character Description }}

  • ???? — Character Description