Template:Term: Difference between revisions

From 44Net Wiki
mw push
mw push
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if:{{{1|}}}
{{#if:{{{1|}}}
  | {{#ifexist:Term:{{{1}}}
  | {{#ifexist:Term:{{{1}}}
     | [[Term:{{{1}}}|{{#tag:span|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}{{#tag:span|{{Term:{{{1}}}|mode=short}}|class=mw-term__card|role=tooltip}}|class=mw-term}}]]
     | [[Term:{{{1}}}|{{#tag:span|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}{{#tag:span|{{Term:{{{1}}}|mode=short}}|class=term__card mw-term__card|role=tooltip|style=display:none;}}|class=term mw-term}}]]
     | {{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}
     | {{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}
   }}
   }}
Line 13: Line 13:


Behavior:
Behavior:
* If <code>Term:&lt;name&gt;</code> exists, this renders a link with a CSS hover card using the term's short definition.
* If <code>Term:&lt;name&gt;</code> exists, this renders a link with a hover card using the term's short definition.
* If it does not exist, this renders plain text (no red link).
* If it does not exist, this renders plain text (no red link).
</noinclude>
</noinclude>

Latest revision as of 22:33, 25 February 2026


Editor usage:

{{term|BGP}}

Optional display text:

{{term|Autonomous System|AS}}

Behavior:

  • If Term:<name> exists, this renders a link with a hover card using the term's short definition.
  • If it does not exist, this renders plain text (no red link).