Difference between revisions of "User:Flame2512/Tree-Custom-Old"

From War Thunder Wiki
Jump to: navigation, search
(Added support for URL images)
(Updated documentation)
Line 20: Line 20:
 
* '''text''' - the text to display where the vehicle name would normally be (optional).
 
* '''text''' - the text to display where the vehicle name would normally be (optional).
 
* '''link''' - the name of the page the box should link to when clicked (optional).
 
* '''link''' - the name of the page the box should link to when clicked (optional).
* '''image''' - the filename of the image to display where the vehicle icon would go (optional).
+
* '''image''' - the filename of the image to display where the vehicle icon would go, or a link to an external file (optional).
 
* '''colour''' - the background colour, specify either '''premium''' or '''squad''' or ignore for default colour
 
* '''colour''' - the background colour, specify either '''premium''' or '''squad''' or ignore for default colour
  
 
== Examples of use ==
 
== Examples of use ==
Linking to the [[Lightning F.6]] page, with a squad coloured background, the text "Random Vehicle", and an image of a ship:
+
===Example #1===
 +
Linking to the [[Lightning F.6]] page, with a squad coloured background, the text "Random Vehicle", and an image specified by wiki file name:
  
 
{{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|colour=squad|image=AIShipDM Battleship Tirpitz.png}}
 
{{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|colour=squad|image=AIShipDM Battleship Tirpitz.png}}
Line 34: Line 35:
 
| colour = squad
 
| colour = squad
 
| image = AIShipDM Battleship Tirpitz.png
 
| image = AIShipDM Battleship Tirpitz.png
 +
}}
 +
</pre>
 +
 +
===Example #2===
 +
Linking to the [[Lightning F.6]] page, with a premium coloured background, the text "Random Vehicle", and an image specified by an external URL:
 +
 +
{{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|colour=premium|image=http://encyclopedia.warthunder.com/slots/b-17g.png}}
 +
 +
<pre>
 +
{{User:U13682523/Tree-Custom
 +
| link = Lightning_F.6
 +
| text = Random Vehicle
 +
| colour = premium
 +
| image = http://encyclopedia.warthunder.com/slots/b-17g.png
 +
}}
 +
</pre>
 +
 +
===Example #3===
 +
Linking to the [[Lightning F.6]] page, with a regular coloured background, the text "Random Vehicle", and an image specified using #unit to obtain an image URL:
 +
 +
{{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|image={{#unit:a6m5otsu|icon}}}}
 +
 +
<pre>
 +
{{User:U13682523/Tree-Custom
 +
| link = Lightning_F.6
 +
| text = Random Vehicle
 +
| image = {{#unit:a6m5otsu|icon}}
 
}}
 
}}
 
</pre>
 
</pre>
  
 
</noinclude>
 
</noinclude>

Revision as of 19:22, 29 January 2021

Description

This template is a fully customisable version of Template:Tree-Unit.

Use

Msg-info.png For clarity template parameters are shown on separate lines. In practice this template is probably better used as a single line
{{User:U13682523/Tree-Custom
| text =
| link =
| image =
| colour =
}}

Parameters

  • text - the text to display where the vehicle name would normally be (optional).
  • link - the name of the page the box should link to when clicked (optional).
  • image - the filename of the image to display where the vehicle icon would go, or a link to an external file (optional).
  • colour - the background colour, specify either premium or squad or ignore for default colour

Examples of use

Example #1

Linking to the Lightning F.6 page, with a squad coloured background, the text "Random Vehicle", and an image specified by wiki file name:

Item own.png
{{{1}}}
{{User:U13682523/Tree-Custom
| link = Lightning_F.6
| text = Random Vehicle
| colour = squad
| image = AIShipDM Battleship Tirpitz.png
}}

Example #2

Linking to the Lightning F.6 page, with a premium coloured background, the text "Random Vehicle", and an image specified by an external URL:

Item own.png
{{{1}}}
{{User:U13682523/Tree-Custom
| link = Lightning_F.6
| text = Random Vehicle
| colour = premium
| image = http://encyclopedia.warthunder.com/slots/b-17g.png
}}

Example #3

Linking to the Lightning F.6 page, with a regular coloured background, the text "Random Vehicle", and an image specified using #unit to obtain an image URL:

Item own.png
{{{1}}}
{{User:U13682523/Tree-Custom
| link = Lightning_F.6
| text = Random Vehicle
| image = {{#unit:a6m5otsu|icon}}
}}