Template:Taglink: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
m herp
Flozi (talk | contribs)
m update taglink for changed anchors
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#css:
{{#css:
   span.hide {
   span.mono {
       display: none;
       font-family: courier, monospace;
   }
   }
   span.hide:only-of-type {
   span.value {
      display: inline;
       color: #ff6600;
      font-size: 90%;
       color: #9f9;
      font-family: monospace;
   }
   }
}}<includeonly>[[#Tag:{{{1}}}|<code>{{{1}}}</code>]]<span><span class="hide"> = </span>{{{2|<span></span>}}}</span></includeonly><noinclude>
}}<includeonly>[[#{{{1}}}|{{{var|{{{1}}}}}}]]{{#if: {{{2|}}}|<span class="mono"> = </span>{{value|{{{2}}}}}|}}</includeonly><noinclude>
A template to simplify cross-referencing definition [[Template:Tag|tags]] (currently only within a page).
A template to simplify cross-referencing definition [[Template:Tag|tags]] (currently only within a page).


Usage:
Usage:


<pre>{{taglink|foo}} bob</pre>
<pre>{{taglink|foo}}</pre>


Result:
Result:


{{taglink|foo}} bob
{{taglink|foo}}


Usage (Optional 2nd param to link to a tag with a given value):
Usage (Optional 2nd param to link to a tag with a given value):


<pre>{{taglink|foo|bar}} bob</pre>
<pre>{{taglink|foo|bar}}</pre>


Result:
Result:
{{taglink|foo|bar}}
{{taglink|foo|bar}}
N.B. Please do not use this tag ''within'' a <nowiki><code></nowiki> block when documenting a formula tags are used in - it will break the markup and is confusing. See [[Gamedev:WeaponDefs#Tag:burstRate]] for an example of the proper usage in this case.
</noinclude>
</noinclude>

Latest revision as of 18:54, 2 June 2020

A template to simplify cross-referencing definition tags (currently only within a page).

Usage:

{{taglink|foo}}

Result:

foo

Usage (Optional 2nd param to link to a tag with a given value):

{{taglink|foo|bar}}

Result: foo = bar

N.B. Please do not use this tag within a <code> block when documenting a formula tags are used in - it will break the markup and is confusing. See Gamedev:WeaponDefs#Tag:burstRate for an example of the proper usage in this case.