Modèle:ItemLink/doc : Différence entre versions

De ARK: Survival Evolved Wiki
Aller à : navigation, rechercher
Ligne 1 : Ligne 1 :
 
{{doc/start}}
 
{{doc/start}}
Link to an item page with an item image in front: {{ItemLink|Stone}}
+
Link to an item page with an item image in front: {{ItemLink|Pierre}}
   
Also supports an optional quantity in front: {{ItemLink|Stone|quantity=5}}
+
Also supports an optional quantity in front: {{ItemLink|Pierre|quantity=5}}
   
 
== Usage ==
 
== Usage ==
<nowiki>{{ItemLink|Stone}}</nowiki>
+
<nowiki>{{ItemLink|Pierre}}</nowiki>
   
 
{| class="wikitable"
 
{| class="wikitable"
Ligne 46 : Ligne 46 :
 
Both lines produce the same output:
 
Both lines produce the same output:
   
<code><nowiki>{{ItemLink|Stone}}</nowiki></code> = {{ItemLink|Stone}}
+
<code><nowiki>{{ItemLink|Pierre}}</nowiki></code> = {{ItemLink|Pierre}}
   
<code><nowiki>{{ItemLink|Stone|text=Stone|link=Stone|image=Stone.png|size=20px|quantity=}}</nowiki></code> = {{ItemLink|Stone|text=Stone|link=Stone|image=Stone.png|size=20px|quantity=}}
+
<code><nowiki>{{ItemLink|Pierre|text=Pierre|link=Pierre|image=Pierre.png|size=20px|quantity=}}</nowiki></code> = {{ItemLink|Pierre|text=Pierre|link=Pierre|image=Pierre.png|size=20px|quantity=}}
   
 
Lowercase link:
 
Lowercase link:
   
<code><nowiki>{{ItemLink|Stone|text=stone}}</nowiki></code> = {{ItemLink|Stone|text=stone}}<br>
+
<code><nowiki>{{ItemLink|Pierre|text=pierre}}</nowiki></code> = {{ItemLink|Pierre|text=pierre}}<br>
<code><nowiki>{{ItemLink|Stone|stone}}</nowiki></code> = {{ItemLink|Stone|stone}}
+
<code><nowiki>{{ItemLink|Pierre|pierre}}</nowiki></code> = {{ItemLink|Pierre|pierre}}
   
 
Plural link:
 
Plural link:
   
<code><nowiki>{{ItemLink|Stone|text=Stones}}</nowiki></code> = {{ItemLink|Stone|text=Stones}}<br>
+
<code><nowiki>{{ItemLink|Pierre|text=Pierres}}</nowiki></code> = {{ItemLink|Pierre|text=Pierres}}<br>
Alternative: <code><nowiki>{{ItemLink|Stone}}s</nowiki></code> = {{ItemLink|Stone}}s
+
Alternative: <code><nowiki>{{ItemLink|Pierre}}s</nowiki></code> = {{ItemLink|Pierre}}s
   
 
Quantity:
 
Quantity:
   
<code><nowiki>{{ItemLink|Stone|quantity=5}}</nowiki></code> = {{ItemLink|Stone|quantity=5}}<br>
+
<code><nowiki>{{ItemLink|Pierre|quantity=5}}</nowiki></code> = {{ItemLink|Pierre|quantity=5}}<br>
<code><nowiki>{{ItemLink|Stone|quantity=5-10}}</nowiki></code> = {{ItemLink|Stone|quantity=5-10}}
+
<code><nowiki>{{ItemLink|Pierre|quantity=5-10}}</nowiki></code> = {{ItemLink|Pierre|quantity=5-10}}
   
 
DLC-suffices are converted automatically to the according icon, if no explicit link-text is given
 
DLC-suffices are converted automatically to the according icon, if no explicit link-text is given
   
<code><nowiki>{{ItemLink|Sand (Scorched Earth)}}</nowiki></code> = {{ItemLink|Sand (Scorched Earth)}}<br>
+
<code><nowiki>{{ItemLink|Sable (Scorched Earth)}}</nowiki></code> = {{ItemLink|Sable (Scorched Earth)}}<br>
<code><nowiki>{{ItemLink|Sand (Scorched Earth)|Sand}}</nowiki></code> = {{ItemLink|Sand (Scorched Earth)|Sand}}
+
<code><nowiki>{{ItemLink|Sable (Scorched Earth)|Sable}}</nowiki></code> = {{ItemLink|Sable (Scorched Earth)|Sable}}
   
 
{{doc/end}}
 
{{doc/end}}

Version du 5 novembre 2019 à 17:43

Template-info.png Documentation

Link to an item page with an item image in front: Pierre

Also supports an optional quantity in front: 5 ×  Pierre

Usage

{{ItemLink|Pierre}}
Parameters
Name Type Required Default
0 string true
text string false The value of the first positional parameter, or the second if given
link string false The value of the first positional parameter
image string false The value of the first positional parameter suffixed with .png
size string false 20px
quantity string false

Examples

Both lines produce the same output:

{{ItemLink|Pierre}} = Pierre

{{ItemLink|Pierre|text=Pierre|link=Pierre|image=Pierre.png|size=20px|quantity=}} = Pierre

Lowercase link:

{{ItemLink|Pierre|text=pierre}} = pierre
{{ItemLink|Pierre|pierre}} = pierre

Plural link:

{{ItemLink|Pierre|text=Pierres}} = Pierres
Alternative: {{ItemLink|Pierre}}s = Pierres

Quantity:

{{ItemLink|Pierre|quantity=5}} = 5 ×  Pierre
{{ItemLink|Pierre|quantity=5-10}} = 5-10 ×  Pierre

DLC-suffices are converted automatically to the according icon, if no explicit link-text is given

{{ItemLink|Sable (Scorched Earth)}} = Sable Scorched Earth Icon.png
{{ItemLink|Sable (Scorched Earth)|Sable}} = Sable

Ceci est une page documentaire, elle devrait être transcluse dans le modèle principal. Voir Modèle:Doc pour de plus amples renseignements.