Template:Xtaglink: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
m update link
Flozi (talk | contribs)
m update xtaglink for changed anchors
 
(5 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;
   }
   }
  span.code {
}}<includeonly>[[{{{1}}}#{{{2}}}|{{{var|{{{2}}}}}}]]{{#if: {{{3|}}}|<span class="mono"> = </span>{{value|{{{3}}}}}|}}</includeonly><noinclude>
      font-size: 90%;
      color: #9f9;
      font-family: monospace;
  }
}}<includeonly>[[{{{1}}}#Tag:{{{2}}}|<code>{{{2}}}</code>]]<span class="code"><span class="hide"> = </span>{{{3|<span></span>}}}</span></includeonly><noinclude>
A template to simplify cross-referencing definition [[Template:Tag|tags]] between different pages. Use [[Template:Taglink]] for links to tags within the same page.
A template to simplify cross-referencing definition [[Template:Tag|tags]] between different pages. Use [[Template:Taglink]] for links to tags within the same page.


Usage:
Usage:


<pre>{{xtaglink|Units-UnitDefs|builder}}</pre>
<pre>{{xtaglink|Gamedev:UnitDefs|builder}}</pre>


Result:
Result:


{{xtaglink|Units-UnitDefs|builder}}
{{xtaglink|Gamedev:UnitDefs|builder}}


Usage (Optional 3rd param to link to a tag with a given value):
Usage (Optional 3rd param to link to a tag with a given value):


<pre>{{xtaglink|Units-UnitDefs|builder|true}}</pre>
<pre>{{xtaglink|Gamedev:UnitDefs|builder|true}}</pre>


Result:
Result:
{{xtaglink|Units-UnitDefs|builder|true}}
{{xtaglink|Gamedev:UnitDefs|builder|true}}


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.
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:55, 2 June 2020

A template to simplify cross-referencing definition tags between different pages. Use Template:Taglink for links to tags within the same page.

Usage:

{{xtaglink|Gamedev:UnitDefs|builder}}

Result:

builder

Usage (Optional 3rd param to link to a tag with a given value):

{{xtaglink|Gamedev:UnitDefs|builder|true}}

Result: builder = true

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.