Template:ItemLink: Difference between revisions
From Ymirheim Wiki
No edit summary |
No edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<templatestyles src="Template:ItemLink/styles.css"/><span class="item-link"><!-- | <includeonly><templatestyles src="Template:ItemLink/styles.css"/><span class="item-link"><!-- | ||
Icon: | Icon: | ||
-->[[File:Item Icon {{#yh_data:item_prototypes|{{{1}}}|Icon}}.png|{{{iconsize|32px}}}|icon|link={{# | -->[[File:Item Icon {{#yh_data:item_prototypes|{{{1}}}|Icon}}.png|{{{iconsize|32px}}}|icon|link={{#ifexpr:{{{1}}} > 1380000000 and {{{1}}} < 1390000000 | Special:MyLanguage/{{#yh_data_eng:skills|{{#expr: {{{1}}} - 380000000 }}|Name}} | Special:MyLanguage/{{#yh_data_eng:item_prototypes|{{{1}}}|Name}} }}]] <!-- | ||
Name: | Name: | ||
--> | -->{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1}}|{{#yh_data_eng:item_prototypes|{{{1}}}|Name}} | ||
|<strong>{{#yh_data:item_prototypes|{{{1}}}|Name}}</strong> | |||
|[[Special:MyLanguage/{{ItemLink.getTargetPageName|{{{1}}}}}|{{#yh_data:item_prototypes|{{{1}}}|Name}}]] | |||
}}{{#ifexist:{{ItemLink.getTargetPageName|{{{1}}}}}||<sup class="item-link-missing" title="Missing Item ID">[<span class="item-link-missing-icon">!</span><span class="item-link-missing-label">#{{{1}}}</span>]</sup>}}</span><!-- | |||
--></includeonly><noinclude> | |||
This template can be used to display link with an icon to a specific game item on a page. | |||
== Usage == | |||
<nowiki>{{ItemLink|ITEM_ID}}</nowiki> | |||
You have to supply the specific item ID, not the item name. | |||
[[File:Item ID Search On Ymirheim Translate.png|thumb|How to find Item ID]] | |||
You can find the item ID by searching the item in [https://translate.ymirheim.org/browse/ymirheim/item_prototypes/en/'''Ymirheim Translate'''] (item_prototypes component). | |||
The item ID is contained in the string key. | |||
For example, if you look up [https://translate.ymirheim.org/browse/ymirheim/item_prototypes/en/?q=Pukui+Peel&sort_by=-priority%2Cposition&checksum= "Pukui Peel"] in Ymirheim Translate, you will see the item ID in the "Key" column (the portion before the forward slash). | |||
== Examples == | |||
<nowiki>{{ItemLink|1330000004}}</nowiki> | |||
Will produce: {{ItemLink|1330000004}}. | |||
<nowiki>{{ItemLink|1380800901}}</nowiki> | |||
Will produce: {{ItemLink|1380800901}}. | |||
[[Category:Game Data Templates{{#translation:}}]] | |||
</noinclude> |
Latest revision as of 17:34, 10 July 2024
This template can be used to display link with an icon to a specific game item on a page.
Usage
{{ItemLink|ITEM_ID}}
You have to supply the specific item ID, not the item name.
You can find the item ID by searching the item in Ymirheim Translate (item_prototypes component).
The item ID is contained in the string key.
For example, if you look up "Pukui Peel" in Ymirheim Translate, you will see the item ID in the "Key" column (the portion before the forward slash).
Examples
{{ItemLink|1330000004}}
Will produce: Pukui Slice.
{{ItemLink|1380800901}}
Will produce: Skill: Sharpened Blades Lv.1.