Difference between revisions of "Template:Tltt"

From MINR.ORG WIKI
(it works, but rv back to prev version for development of it)
m (incorporating Gracenotes's additions)
Line 1: Line 1:
<tt><span title="{{{2}}}">{{<span title="{{{2}}}">[[Template:{{{1}}}|{{{1}}}]]{{#if:{{{par|}}}|&#124;{{{par}}}}}</span>}}</span></tt><noinclude>
+
<span title="{{{2}}}" style="font-family:monospace;">&#123;&#123;[[Template:{{{1}}}|<span title="{{{2}}}">{{{1}}}</span>]]{{#if:{{{par|}}} |{{!}}{{{par}}}}}{{#if:{{{par2|}}}|{{!}}{{{par2}}}}}&#125;&#125;</span><noinclude>
  
 
===Meaning===
 
===Meaning===
Line 9: Line 9:
 
The template is meant to be used in pages such as {{tltt|TestTemplates|Our list of user warning templates}}, where it is desirable to provide a bit more explanation for a template than what its name reveals.
 
The template is meant to be used in pages such as {{tltt|TestTemplates|Our list of user warning templates}}, where it is desirable to provide a bit more explanation for a template than what its name reveals.
  
Differently from <nowiki>{{tl}}</nowiki>, it contains a  <nowiki><tt></nowiki> tag to make all names appear in [[non-proportional font]].  
+
Differently from <nowiki>{{tl}}</nowiki>, the font is set in monospace, so that all text appears in [[non-proportional font]].
 
 
In addition, the template can add one parameters as follows:
 
* <nowiki>{{tltt|unblock|par=Reason for unblock|Request to be unblocked}}</nowiki> or, equivalently
 
* <nowiki>{{tltt|unblock|Request to be unblocked|par=Reason for unblock}}</nowiki>
 
 
 
If you want to include more than one parameter, separate them with "&#124;" (without the quotes), which will render as a pipe symbol. Example:
 
 
 
* <nowiki>{{tltt|some template|description of this template|par=par1&#124;par2}}</nowiki> will render as:<br> {{tltt|some template|description of this template|par=par1&#124;par2}}
 
  
 +
The template also permits up to two named parameters, like so:
 +
:<tt><nowiki>{{tltt|Template name|Tooltip text|par=First parameter=1|par2=Second parameter=2}}</nowiki></tt>
 +
Produces:
 +
:{{tltt|Template name|Tooltip text|par=First parameter=1|par2=Second parameter=2}}
  
 
===Known problems===
 
===Known problems===

Revision as of 16:55, 15 February 2007

{{[[Template:{{{1}}}|{{{1}}}]]}}

Meaning

tltt stands for "template link with tooltip". "tt" also can stand for the <tt> tag that surrounds it.

Usage

Like {{tl}} (see documentation), with an additional parameter for the tooltip. This will be displayed when user hovers over the curly braces. (Try it right here: {{tltt}}!)

The template is meant to be used in pages such as {{TestTemplates}}, where it is desirable to provide a bit more explanation for a template than what its name reveals.

Differently from {{tl}}, the font is set in monospace, so that all text appears in non-proportional font.

The template also permits up to two named parameters, like so:

{{tltt|Template name|Tooltip text|par=First parameter=1|par2=Second parameter=2}}

Produces:

{{Template name|First parameter=1|Second parameter=2}}

Known problems

  • On some systems, the text only displays when user hovers over the curly braces, not over the link itself.
  • It is not possible to include double quotes in the text. Use single quotes instead.