Difference between revisions of "Template:Term"

 
Line 19: Line 19:
 
**<nowiki>[[Meta:Terminology#Xfoo|foo]]</nowiki>
 
**<nowiki>[[Meta:Terminology#Xfoo|foo]]</nowiki>
 
***{{Term|foo|p=X}}
 
***{{Term|foo|p=X}}
</noinclude><includeonly><span class="terminology">[[Meta:Terminology#{{#if:{{{s|}}}|{{#invoke:String|replace|{{{p|}}}{{{1|}}}| |}}|{{{p|}}}{{{1|}}}|}}|{{{2|{{{1|}}}}}}]]</span></includeonly>
+
 
 +
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>