Template:Imagelink/doc: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(moved documentation of template to seperate page)
 
m (fixed links)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Usage ==
<pre>
<pre>
{{imagelink|icon|link|caption}}
{{imagelink|icon|link|caption}}
</pre>
* The link and caption parameters are optional. If both are not present the link will go to the page with the name of the first parameter with language suffix if the icon is on a non-english page (e.g. icon/de on a German page). The text next the icon is translated to the language of the page it is on.
* If the second parameter is present, the links will go to exactly that page, no language suffixes are added. The text next to the icon is then translated from that second parameter.
* If the third parameter is present the text next to the icon is exactly that text.


1. {{imagelink|rocket|Rocket}}
== Usage ==
2. {{imagelink|basic-splitter|Transport network#Basic splitter|Basic splitter}}
<pre>
{{imagelink|Rocket}} {{Imagelink|Rocket|Transport belt/de}} {{imagelink|splitter|Belt transport system#Splitters|Basic splitter}}
</pre>
</pre>
The template automatically translates the link if no caption is provided and the page is not in English.
== Result ==
== Result ==
1. {{imagelink|rocket|Rocket}}
{{imagelink|Rocket}} {{Imagelink|Rocket|Transport belt/de}} {{imagelink|splitter|Belt transport system#Splitters|Basic splitter}}
2. {{imagelink|basic-splitter|Transport network#Basic splitter|Basic splitter}}

Latest revision as of 12:10, 2 March 2020

{{imagelink|icon|link|caption}}
  • The link and caption parameters are optional. If both are not present the link will go to the page with the name of the first parameter with language suffix if the icon is on a non-english page (e.g. icon/de on a German page). The text next the icon is translated to the language of the page it is on.
  • If the second parameter is present, the links will go to exactly that page, no language suffixes are added. The text next to the icon is then translated from that second parameter.
  • If the third parameter is present the text next to the icon is exactly that text.

Usage

{{imagelink|Rocket}} {{Imagelink|Rocket|Transport belt/de}} {{imagelink|splitter|Belt transport system#Splitters|Basic splitter}}

Result

Rocket.png

Rocket

Rocket.png

Transport belt

Splitter.png

Basic splitter