This template is protected from editing.

Difference between revisions of "Template:Class link"

From Team Fortress Wiki
Jump to: navigation, search
m
m (I didn't realize there was a real sandbox. Supports custom colors, and should be a bit easier to read now.)
Line 1: Line 1:
<includeonly>{{#if:{{{br|}}}|<div style="text-align:center;">}}{{#if:{{{noimg|}}}||{{Icon class|{{{1|Scout}}}|size={{{size|{{{2|20px}}}}}}|link={{{link|{{{1|Scout}}}{{if lang}}}}}}}}}{{#if:{{{br|}}}|<br/>|{{#if:{{{noimg|}}}||&nbsp;}}}}[[{{{link|{{{1|Scout}}}{{if lang}}}}}|{{Class name|{{{1|Scout}}}}}]]{{#if:{{{br|}}}|</div>}}</includeonly><noinclude>
+
<includeonly><!--
 +
-->{{#if:{{{br|}}}|<div style="text-align:center;">}}<!-- In a table, so center,
 +
-->{{#if:{{{noimg|}}}
 +
  | <!-- No image -->
 +
  |{{Icon class
 +
    |{{{1|Scout}}}
 +
    |size={{{size|{{{2|20px}}} }}}
 +
    |link={{{link|{{{1|Scout}}}{{if lang}} }}}
 +
  }}{{#if:{{{br|}}}||&nbsp;}}<!-- Add a space between image and text if no break -->
 +
}}{{#if:{{{br|}}}|<br/>}}<!--
 +
-->[[{{{link|{{{1|Scout}}}{{if lang}}}}}|<!--
 +
-->{{#if:{{{color|}}}|<span style="color:{{{color}}}; text-decoration: none">}}<!--
 +
  -->{{Class name|{{{1|Scout}}}}}<!--
 +
-->{{#if:{{{color|}}}|</span>}}]]<!--
 +
-->{{#if:{{{br|}}}|</div>}}</includeonly><noinclude>
 
{{doc begin}}
 
{{doc begin}}
 
=== Usage ===
 
=== Usage ===
* {{tlx|class link|Soldier}} produces {{class link|Soldier}}
+
* {{tlx|class link|Soldier}} produces {{Class link|Soldier}}
* {{tlx|class link|Scout|3=link=Scout achievements}} produces {{class link|Scout|link=Scout achievements}}
+
* {{tlx|class link|Scout|3=link=Scout achievements}} produces {{Class link|Scout|link=Scout achievements}}
* {{tlx|class link|Pyro|3=size=48px}} produces {{class link|Pyro|size=48px}}
+
* {{tlx|class link|Pyro|3=size=48px}} produces {{Class link|Pyro|size=48px}}
* {{tlx|class link|Pyro|3=noimg=true}} produces {{class link|Pyro|noimg=true}}
+
* {{tlx|class link|Pyro|3=noimg=true}} produces {{Class link|Pyro|noimg=true}}
 
* {{tlx|class link|Medic|3=br=yes}} in a table produces:
 
* {{tlx|class link|Medic|3=br=yes}} in a table produces:
  
{| class="wikitable grid" width="10%" style="text-align: center;"
+
{| class="wikitable grid" width="10%"
! class="header" | Random table
+
| {{Class link|Medic|br=yes}}
|-
+
|}
| {{class link|Medic|br=yes}}
+
 
 +
* {{tlx|class link|Medic|3=br=yes|4=color=#F0F}} in a table produces:
 +
 
 +
{| class="wikitable grid" width="10%"
 +
| {{Class link|Medic|br=yes|color=#F0F}}
 
|}
 
|}
  

Revision as of 19:07, 2 January 2017

Documentation for Class link

Usage

  • {{class link|Medic|br=yes|color=#F0F}} in a table produces: