Difference between revisions of "Template:Term"

 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>Links to the specified term on [[Meta:Terminology]]. Also gives the link the "terminology" class, which can be used to change its appearance in certain contexts.
+
<noinclude>Links to the specified term on [[Meta:Terminology]]. Also surrounds the link in a span tag with the "terminology" class, which can be used to change its appearance in certain contexts.
  
 
*<nowiki>{{Term|foo}}</nowiki>
 
*<nowiki>{{Term|foo}}</nowiki>
 
**<nowiki>[[Meta:Terminology#foo|foo]]</nowiki>
 
**<nowiki>[[Meta:Terminology#foo|foo]]</nowiki>
***[[Meta:Terminology#foo|foo]]
+
***{{Term|foo}}
 
*<nowiki>{{Term|foo|bar}}</nowiki>
 
*<nowiki>{{Term|foo|bar}}</nowiki>
 
**<nowiki>[[Meta:Terminology#foo|bar]]</nowiki>
 
**<nowiki>[[Meta:Terminology#foo|bar]]</nowiki>
***[[Meta:Terminology#foo|bar|rel=terminology]]
+
***{{Term|foo|bar}}
</noinclude><includeonly>[[Meta:Terminology#{{{1|}}}|{{{2|{{{1|}}}}}}]]</includeonly>
+
 
 +
The ''s'' parameter causes spaces to be omitted from the link.
 +
 
 +
*<nowiki>{{Term|foo bar|s=anything}}</nowiki>
 +
**<nowiki>[[Meta:Terminology#foobar|foo bar]]</nowiki>
 +
***{{Term|foo bar|s=anything}}
 +
 
 +
The ''p'' parameter prefixes something to the term being linked to.
 +
 
 +
*<nowiki>{{Term|foo|p=X}}</nowiki>
 +
**<nowiki>[[Meta:Terminology#Xfoo|foo]]</nowiki>
 +
***{{Term|foo|p=X}}
 +
 
 +
The ''t'' parameter overrides the link's normal title text ("Meta:Terminology") with whatever you specify.
 +
 
 +
*<nowiki>{{Term|foo|t=Hello}}</nowiki>
 +
**<nowiki><span title="Hello">[[Meta:Terminology#foo|foo]]</span></nowiki>
 +
***{{Term|foo|t=Hello}}
 +
</noinclude><includeonly><span {{#if:{{{t|}}}|title="{{{t}}}" data-title-override}} class="terminology">[[Meta:Terminology#{{#if:{{{s|}}}|{{#invoke:String|replace|{{{p|}}}{{{1|}}}| |}}|{{{p|}}}{{{1|}}}|}}|{{{2|{{{1|}}}}}}]]</span></includeonly>

Latest revision as of 23:03, 7 May 2017

Links to the specified term on Meta:Terminology. Also surrounds the link in a span tag with the "terminology" class, which can be used to change its appearance in certain contexts.

  • {{Term|foo}}
    • [[Meta:Terminology#foo|foo]]
  • {{Term|foo|bar}}
    • [[Meta:Terminology#foo|bar]]

The s parameter causes spaces to be omitted from the link.

  • {{Term|foo bar|s=anything}}
    • [[Meta:Terminology#foobar|foo bar]]

The p parameter prefixes something to the term being linked to.

  • {{Term|foo|p=X}}
    • [[Meta:Terminology#Xfoo|foo]]

The t parameter overrides the link's normal title text ("Meta:Terminology") with whatever you specify.

  • {{Term|foo|t=Hello}}
    • <span title="Hello">[[Meta:Terminology#foo|foo]]</span>