「テンプレート:ItemLink」の版間の差分

提供: ARK: Survival Evolved Wiki
移動先: 案内検索
 
(同じ利用者による、間の3版が非表示)
2行目: 2行目:
 
-->{{#vardefine:dlc|}}<!--
 
-->{{#vardefine:dlc|}}<!--
 
-->{{#vardefine:linktext|{{{1|}}}}}<!--
 
-->{{#vardefine:linktext|{{{1|}}}}}<!--
-->{{#vardefine:filename|{{{image|{{#replace:{{#replace:{{{1}}}|:|_}}|+|-}}.png}}}}}<!--
+
-->{{#vardefine:filename|{{{image|{{#replace:{{#replace:{{#replace:{{{1}}}|:|_}}|+|-}}|/|_}}.png}}}}}<!--
 
-->{{#if:{{{text|{{{2|}}}}}}||<!-- else
 
-->{{#if:{{{text|{{{2|}}}}}}||<!-- else
 
-->{{#if:{{#pos:{{{1}}}|(The Center)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-13}}}}{{#vardefine:dlc|&nbsp;[[File:The Center Icon.png|link=The Center]]}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|(The Center)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-13}}}}{{#vardefine:dlc|&nbsp;[[File:The Center Icon.png|link=The Center]]}}}}<!--
11行目: 11行目:
 
-->{{#if:{{#pos:{{{1}}}|(Aberration)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-13}}}}{{#vardefine:dlc|&nbsp;[[File:Aberration Icon.png|link=Aberration]]}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|(Aberration)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-13}}}}{{#vardefine:dlc|&nbsp;[[File:Aberration Icon.png|link=Aberration]]}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|(Extinction)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-13}}}}{{#vardefine:dlc|&nbsp;[[File:Extinction Icon.png|link=Extinction]]}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|(Extinction)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-13}}}}{{#vardefine:dlc|&nbsp;[[File:Extinction Icon.png|link=Extinction]]}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|(Genesis: Part 1)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-18}}}}{{#vardefine:dlc|&nbsp;[[File:Genesis Part 1 Icon.png|link=Genesis: Part 1]]}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|(Crystal Isles)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-16}}}}{{#vardefine:dlc|&nbsp;[[File:Crystal Isles Icon.png|link=Crystal Isles]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|(Genesis: Part 2)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-18}}}}{{#vardefine:dlc|&nbsp;[[File:Genesis Part 2 Icon.png|link=Genesis: Part 2]]}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|(Mobile)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-9}}}}{{#vardefine:dlc|&nbsp;[[File:Logo Mobile.svg|16x16px|link=ARK: Survival Evolved Mobile]]}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|(Mobile)}}|{{#vardefine:linktext|{{#sub:{{{1}}}|0|-9}}}}{{#vardefine:dlc|&nbsp;[[File:Logo Mobile.svg|16x16px|link=ARK: Survival Evolved Mobile]]}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:Primal Fear}}|{{#vardefine:linktext|{{#sub:{{{1}}}|16}}}}{{#vardefine:dlc|&nbsp;[[File:PrimalFearIcon.png|link=Mod:Primal Fear]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:Primal Fear/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|16}}}}{{#vardefine:dlc|&nbsp;[[File:PrimalFearIcon.png|link=Mod:Primal Fear]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|Mod:Ebenus Astrum/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|18}}}}{{#vardefine:dlc|&nbsp;[[File:Ebenus Astrum Icon.png|link=Mod:Ebenus Astrum]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|Mod:Ebenus Astrum/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|18}}}}{{#vardefine:dlc|&nbsp;[[File:Ebenus Astrum Icon.png|link=Mod:Ebenus Astrum]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:Better MEKs!}}|{{#vardefine:linktext|{{#sub:{{{1}}}|17}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Better MEKs! Icon.png|link=Mod:Better MEKs!]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:Better MEKs!/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|17}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Better MEKs! Icon.png|link=Mod:Better MEKs!]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:ARK Additions}}|{{#vardefine:linktext|{{#sub:{{{1}}}|18}}}}{{#vardefine:dlc|&nbsp;[[File:ARK Additions Icon.png|link=Mod:ARK Additions]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:ARK Additions/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|18}}}}{{#vardefine:dlc|&nbsp;[[File:ARK Additions Icon.png|link=Mod:ARK Additions]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:S+}}|{{#vardefine:linktext|{{#sub:{{{1}}}|4}}}}{{#vardefine:dlc|&nbsp;[[File:Structures Plus Icon.png|link=Mod:Structures Plus]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:Structures Plus/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|20}}}}{{#vardefine:dlc|&nbsp;[[File:Structures Plus Icon.png|link=Mod:Structures Plus]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:Ark Eternal}}|{{#vardefine:linktext|{{#sub:{{{1}}}|16}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Ark Eternal Icon.png|link=Mod:Ark Eternal]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:Ark Eternal/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|16}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Ark Eternal Icon.png|link=Mod:Ark Eternal]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:Archaic Ascension}}|{{#vardefine:linktext|{{#sub:{{{1}}}|22}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Archaic Ascension Icon.png|link=Mod:Archaic Ascension]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:Archaic Ascension/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|22}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Archaic Ascension Icon.png|link=Mod:Archaic Ascension]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
-->{{#if:{{#pos:{{{1}}}|Mod:Steampunk}}|{{#vardefine:linktext|{{#sub:{{{1}}}|14}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Steampunk Icon.png|link=Mod:Steampunk]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Mod:Steampunk/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|14}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Steampunk Icon.png|link=Mod:Steampunk]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Primal NPCs/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|16}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Primal NPCs Icon.png|link=Mod:Primal NPCs]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Caballus/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|13}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Caballus Icon.png|link=Mod:Caballus]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Prehistoric Beasts/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|23}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Prehistoric Beasts Icon.png|link=Mod:Prehistoric Beasts]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:The Chasm/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|14}}}}{{#vardefine:dlc|&nbsp;[[File:ChasmLogoSmall.jpg|link=Mod:The Chasm]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Castles, Keeps, and Forts Remastered/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|41}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Castles Keeps Forts Architecture Remastered Icon.png|link=Mod:Castles, Keeps, and Forts Remastered]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Crystal Isles Dino Collection/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|34}}}}{{#vardefine:dlc|&nbsp;[[File:Crystal Isles Dino Collection Icon.png|link=Mod:Crystal Isles Dino Collection]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Additional Creatures: Grand Hunt/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|37}}}}{{#vardefine:dlc|&nbsp;[[File:Additional Creatures Grand Hunt Icon.png|link=Mod:Additional Creatures: Grand Hunt]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
  +
-->{{#if:{{#pos:{{{1}}}|Mod:Super Structures/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|21}}}}{{#vardefine:dlc|&nbsp;[[File:Mod Super Structures icon.png|link=Mod:Super Structures]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!--
 
-->}}<!--
 
-->}}<!--
-->[[File:{{#var:filename}}|{{{size|20x20px}}}|class=itemlink]][[{{{link|{{{1}}}}}}|{{{text|{{{2|{{PAGENAME:{{#var:linktext}}}}}}}}}}]] {{#if:{{{quantity|}}}| ×&nbsp;{{{quantity}}}}}<!--
+
-->[[File:{{#var:filename}}|{{{size|20x20px}}}|class=itemlink|alt=|link={{{link|{{{1}}}}}}]][[{{{link|{{{1}}}}}}|{{{text|{{{2|{{PAGENAME:{{#var:linktext}}}}}}}}}}]]{{#if:{{{quantity|}}}|&nbsp;×&nbsp;{{{quantity}}} }}<!--
 
-->{{#if:{{{noDlcIcon|}}}||{{#var:dlc|}}}}<!--
 
-->{{#if:{{{noDlcIcon|}}}||{{#var:dlc|}}}}<!--
 
--></includeonly></onlyinclude>
 
--></includeonly></onlyinclude>

2021年4月4日 (日) 05:52時点における最新版

Template-info.png Documentation

アイテム画像が前側にあるアイテムページへのリンク: Stone

前側のオプションの数量もサポート: Stone × 5

使用法

{{ItemLink|Stone}}
パラメーター
名前 タイプ 必須 既定
0 string true
text string false 最初の定位置パラメーターの値、または指定されている場合は2番目の値
link string false 最初の定位置パラメーターの値
image string false .pngの接尾辞が付いた最初の定位置パラメーターの値
size string false 20px
quantity string false
noDlcIcon bool false

両方の行が同じ出力を生成します:

{{ItemLink|Stone}} = Stone

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

Lowercase link:

{{ItemLink|Stone|text=stone}} = stone
{{ItemLink|Stone|stone}} = stone

Plural link:

{{ItemLink|Stone|text=Stones}} = Stones
Alternative: {{ItemLink|Stone}}s = Stones

Quantity:

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

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

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

The parameter noDlcIcon hides the extra DLC-/mod-icon

{{ItemLink|Sand (Scorched Earth)|noDlcIcon=1}} = Sand