Template:Glossary: Difference between revisions

No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}{{#tag:ref|See [[Glossary:{{{1}}}]].}}</includeonly><noinclude>
{{#if:{{{fn|}}}|
<templatedata>
<span class="glossary-link">
{
[[Glossary:{{{term}}}|{{{text|{{{term}}}}}}]]
  "description": "Outputs a glossary term name (or optional display name) and inserts a reference linking to the glossary entry.",
<ref name="glossary-{{{term}}}">
  "params": {
[[Glossary:{{{term}}}]] — glossary definition
    "1": {
</ref></span>|<span class="glossary-link">[[Glossary:{{{term}}}|{{{text|{{{term}}}}}}]]</span>}}
      "label": "Glossary term",
</includeonly>
      "description": "Name of the glossary entry (without the Glossary: namespace).",
 
      "type": "string",
<noinclude>
      "required": true
Usage:
    },
 
    "2": {
<pre>
      "label": "Display text",
{{Glossary|term=Foobar}}
      "description": "Optional text to display instead of the glossary term name.",
{{Glossary|term=Foobar|text=foobar widget}}
      "type": "string",
{{Glossary|term=Foobar|fn=1}}
      "required": false
</pre>
    }
  }
}
</templatedata>
</noinclude>
</noinclude>