Template:You may/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
m (fixing example)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''{{tl|you may}}'' is a simple template for adding a [[dab|disambiguation]] note at the top of a page.  It's preferable to just typing the raw text on the page, because we can then control the styling and placement of the disambiguation note, which will help us achieve a consistent look across the wiki.
'''{{tl|you may}}''' is a simple template for adding a [[dab|disambiguation]] note at the top of a page.  It's preferable to just typing the raw text on the page, because:
* it's fewer keystrokes
* it allows for consistent styling
* it will allow us to swiftly change the look of dab notes in the future.


As of February 2012, this system of styled disambiguation notes is in its infancy, though it is already well developed on other wikis such as [[starwars:Wookieepedia|Wookieepedia]], [[memoryalpha:Memory Alpha|Memory Alpha]] and {{w|Wikipedia}}.   
This system is already well developed on other wikis such as [[starwars:Wookieepedia|Wookieepedia]], [[memoryalpha:Memory Alpha|Memory Alpha]] and {{w|Wikipedia}}.   


==Usage==
==Usage==
<div id=tech>This template should always be '''immediately''' above the first line the lead sentence of the article.  That is, it should be directly underneath the infobox. It should never be placed ''above'' either the infobox or the top-of-page banner, like {[tl|real world}}</div>
Type the following to activate this template:
Type the following to activate this template:
<pre>
<code><nowiki>{{you may|thing 1|thing 2}}</nowiki></code>
{{you may|thing 1|thing 2}}
</pre>


:'''''thus'''''  
:'''''thus'''''  


<code><nowiki>{{you may|Untitled (DWM 184}}</nowiki></code> results in:
<code><nowiki>{{you may|Untitled (DWM 184)}}</nowiki></code> results in:
 
{{you may|Untitled (DWM 184)}}
{{you may|Untitled (DWM 184)}}


Line 21: Line 25:


===Advanced usage===
===Advanced usage===
For the sake of varyin word choice, you may not wish to always use the language "You may be looking for ''a'' or ''b''."  Indeed, you may wish to hide disambiguated or very long names.  
For the sake of varying word choice, you may not wish to always use the language "You may be looking for ''a'' or ''b''."  Indeed, you may wish to hide disambiguated or very long names.  


In such cases, you can choose to enter a display name, using the variables <code>n1</code> and <code>n2</code>.
In such cases, you can choose to enter a display name, using the variables <code>n1</code> and <code>n2</code>.


<code><nowiki>{{you may|Fear (audio story)|n1=the audio story of the same name}}</code></nowiki>
<code><nowiki>{{you may|Fear (audio story)|n1=the audio story of the same name}}</nowiki></code>


:'''''results in'''''
:'''''results in'''''
{{you may|Fear (audio story)|n1=the audio story of the same name}}
{{you may|Fear (audio story)|n1=the audio story of the same name}}
:'''''while'''''
<code><nowiki>{{you may|Flashback (short story)|Flashback (comic story)|n1=the short story|n2=the comic story}}</nowiki></code> which results in
{{you may|Flashback (short story)|Flashback (comic story)|n1=the short story|n2=the comic story of the same name}}


== Limitation ==
== Limitation ==
This template cannot handle anything ''over'' two choices. Our [[dab|disambiguation policy]] holds that anything with three or more alternatives should get a full disambiguation page.  Thus, the appropriate template in such cases — '''{{tl|dab page}}''' — would lead to a single disambiguation page, rather than offer choices.
This template cannot handle anything ''over'' two choices. Our [[dab|disambiguation policy]] holds that anything with three or more alternatives should get a full disambiguation page.  Thus, the appropriate template in such cases — '''{{tl|dab page}}''' — would lead to a single disambiguation page, rather than offer choices.
<noinclude>[[category:template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 20:49, 14 April 2024

{{you may}} is a simple template for adding a disambiguation note at the top of a page. It's preferable to just typing the raw text on the page, because:

  • it's fewer keystrokes
  • it allows for consistent styling
  • it will allow us to swiftly change the look of dab notes in the future.

This system is already well developed on other wikis such as Wookieepedia, Memory Alpha and Wikipedia.

Usage

This template should always be immediately above the first line the lead sentence of the article. That is, it should be directly underneath the infobox. It should never be placed above either the infobox or the top-of-page banner, like {[tl|real world}}

Type the following to activate this template: {{you may|thing 1|thing 2}}

thus

{{you may|Untitled (DWM 184)}} results in:

You may be looking for Untitled (DWM 184).
while

{{you may|Untitled (DWM 184)|Untitled (DWM 171)}} produces:

You may be looking for Untitled (DWM 184) or Untitled (DWM 171).

Advanced usage

For the sake of varying word choice, you may not wish to always use the language "You may be looking for a or b." Indeed, you may wish to hide disambiguated or very long names.

In such cases, you can choose to enter a display name, using the variables n1 and n2.

{{you may|Fear (audio story)|n1=the audio story of the same name}}

results in
You may be looking for the audio story of the same name.
while

{{you may|Flashback (short story)|Flashback (comic story)|n1=the short story|n2=the comic story}} which results in

Limitation

This template cannot handle anything over two choices. Our disambiguation policy holds that anything with three or more alternatives should get a full disambiguation page. Thus, the appropriate template in such cases — {{dab page}} — would lead to a single disambiguation page, rather than offer choices.