Template:ItemLink/doc: Difference between revisions

From CrossCode Wiki
Jump to navigation Jump to search
(linkOverride)
m (Use the `partial` parameter of Template:TemplateData)
 
(50 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{doc/start}}
{{doc/start}}
{{Lua|Module:ItemLink|Module:ItemLink/nameList|Module:ItemLink/levelList|Module:ItemLink/foodIconList}}
This is a template for adding links to items.
This is a template for adding links to items.


{| class="wikitable"
== About ==
! Code
Add a link to the Item. There are many possibitities to customize the behavior.
! Result
 
|-
== Parameter ==
| <pre>{{ItemLink|Winterclaw}}</pre>
=== Item name ===
| {{ItemLink|Winterclaw}}
{{TemplateData|
|-
{{TemplateData/entry|name=Item Name|param=1|desc=Item name|def=NULL|example=
| <pre>{{ItemLink|Geo-Data #3469}}</pre>
* {{ItemLink|Ginger Tom. Salad}}
| {{ItemLink|Geo-Data #3469}}
* {{ItemLink|Edge o' All}}
|-
<pre>* {{ItemLink|Ginger Tom. Salad}}
| <pre>{{ItemLink|Recruit's Scope}}</pre>
* {{ItemLink|Edge o' All}}</pre>|type=String|status=Required}}
| {{ItemLink|Recruit's Scope}}
{{TemplateData/entry|name=Name Override|param=showName|desc=Shows the defined name/Overrides the Item-Name (alternative Name)|def=NULL|example={{ItemLink|Ginger Tom. Salad|showName=Blattsalat}} <pre>{{ItemLink|Ginger Tom. Salad|showName=Blattsalat}}</pre>|type=String|status=Optional}}
|}
| partial = 1
}}
 
=== Hide and show elements ===
{{TemplateData|
{{TemplateData/entry|name=No Icon|param=noIcon|desc=Hides the Icon|def=0|example=
* No Icon (<code>1</code>): {{ItemLink|Ginger Tom. Salad|noIcon=1}}
* Icon (<code>0</code>): {{ItemLink|Ginger Tom. Salad|noIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Ginger Tom. Salad}}
<pre>* No Icon (<code>1</code>): {{ItemLink|Ginger Tom. Salad|noIcon=1}}
* Icon (<code>0</code>): {{ItemLink|Ginger Tom. Salad|noIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Ginger Tom. Salad}}</pre>|type=Boolean|status=Optional}}
{{TemplateData/entry|name=No Link|param=noLink|desc=Removes the link|def=0|example=
* No Link (<code>1</code>): {{ItemLink|Chili Dog|noLink=1}}
* Link (<code>0</code>): {{ItemLink|Chili Dog|noLink=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}
<pre>* No Link (<code>1</code>): {{ItemLink|Chili Dog|noLink=1}}
* Link (<code>0</code>): {{ItemLink|Chili Dog|noLink=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}</pre>|type=Boolean|status=Optional}}
{{TemplateData/entry|name=No level|param=noLevel|desc=Hides the level|def=0|example=
* Hide (<code>1</code>): {{ItemLink|Scrappy Plate|noLevel=1}}
* Show (<code>0</code>): {{ItemLink|Scrappy Plate|noLevel=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Scrappy Plate}}
<pre>* Hide (<code>1</code>): {{ItemLink|Scrappy Plate|noLevel=1}}
* Show (<code>0</code>): {{ItemLink|Scrappy Plate|noLevel=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Scrappy Plate}}</pre>|type=Boolean|status=Optional}}
{{TemplateData/entry|name=Show Food Icon|param=showFoodIcon|desc=Show the food icon|def=0|example=
* Show (<code>1</code>): {{ItemLink|Chili Dog|showFoodIcon=1}}
* Hide (<code>0</code>): {{ItemLink|Chili Dog|showFoodIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}
<pre>* Show (<code>1</code>): {{ItemLink|Chili Dog|showFoodIcon=1}}
* Hide (<code>0</code>): {{ItemLink|Chili Dog|showFoodIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}</pre>|type=Boolean|status=Optional}}
| partial = 1
}}
 
=== Wrap behavior ===
{{TemplateData|
{{TemplateData/entry|name=Disable brakes|param=nowrap|desc=disable or enable Nowrap (prevent line breaks)|def=1|example=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</pre>|type=Boolean|status=Optional}}
| partial = 1
}}
 
=== Custom Level ===
The associated equipment level is shown by default. Use the option only for an deviating equipment level or for adding a level to non equipment items.
 
{{TemplateData|
{{TemplateData/entry
| name    = Level override
| param  = level
| desc    = Set a custom level to display.
| example = <nowiki/>
; Equipment<nowiki>:</nowiki>
: {{ItemLink|Edge o' All|level=2}}
: {{ItemLink|Scrappy Plate|level=17}}
: {{ItemLink|Old Geta|level=ascended}}
; Other Item(s)<nowiki>:</nowiki>
: {{ItemLink|Chili Dog|level=15}}
<pre>
; Equipment:
: {{ItemLink|Edge o' All|level=2}}
: {{ItemLink|Scrappy Plate|level=17}}
: {{ItemLink|Old Geta|level=ascended}}
; Other Item(s):
: {{ItemLink|Chili Dog|level=15}}
</pre>
| type    = <nowiki>[ Number | "ascended" ]</nowiki>
| status  = Optional
}}
| partial = 1
}}
 
=== Custom Food icon ===
The food icon is hidden by default see [[#Hide and show elements|Hide and show elements]] for showing the associated food icon.
 
{{TemplateData|
{{TemplateData/entry|name=Food icon override|param=foodIcon|desc=Set a custom food icon|def=NULL|example=Food: {{ItemLink|Chili Dog|foodIcon=FruitSalad_FoodIcon.png}} Other Item(s): {{ItemLink|Scrappy Plate|foodIcon=FruitSalad_FoodIcon.png}}<pre>Food: {{ItemLink|Chili Dog|foodIcon=FruitSalad_FoodIcon.png}} Other Item(s): {{ItemLink|Scrappy Plate|foodIcon=FruitSalad_FoodIcon.png}}</pre>|type=String|status=Optional}}
| partial = 1
}}
 
=== Disable auto-rename ===
{{TemplateData|
{{TemplateData/entry|name=No Rename|param=noRename|desc=disable or enable noRename (prevent auto-rename)|def=0|example=noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|-Rauser|showName=-Rauser<sub>r</sub>}} <pre>noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}</pre>|type=Boolean|status=Optional}}
| partial = 1
}}


== Customisation ==
=== Return information (internal use) ===
There are many possibitities to customize the behavior.
{{TemplateData|
{{TemplateData/entry
|name=Level return (Data override)
|param=levelOverride
|desc=disable or enable levelOverride (return the level)
|def=0
|example=
* levelOverride: {{ItemLink|Scrappy Plate|levelOverride=1}}
<pre>levelOverride: {{ItemLink|Scrappy Plate|levelOverride=1}}</pre>
* no levelOverride: {{ItemLink|Scrappy Plate|levelOverride=0}}
<pre>no levelOverride: {{ItemLink|Scrappy Plate|levelOverride=0}}</pre>
* Other Item(s): {{ItemLink|Chili Dog|levelOverride=1}}(blank)
<pre>Other Item(s): {{ItemLink|Chili Dog|levelOverride=1}}(blank)</pre>
|type=Boolean
|status=Optional
}}
{{TemplateData/entry
|name=Level return (allow ascended)
|param=allowAscended
|desc=Allow returning <code>ascended</code> when <code>levelOverride</code> is <code>1</code>.<br
/>Lua modules should use <code>[[mw:Extension:Scribunto/Lua_reference_manual#mw.loadData|mw.loadData]]("[[Module:ItemLink/levelList]]")</code> directly.
|def=0
|example=
* <pre>allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=1}}</pre><!--
-->allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=1}}


{| class="wikitable"
* <pre>no allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=0}} (blank)</pre><!--
! style="width:115px" | Parameter
-->no allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=0}} (blank)
! style="width:100px" | Type
|type=Boolean
! style="width:90px" | Default
|status=Optional
! Description
}}
|-
| partial = 1
| rowspan="3"| noIcon
}}
| rowspan="3"| boolean (1/0)
| rowspan="3"| show (0)
|Hide (1) or show (0) the Icon
|-
|<pre>{{ItemLink|Ginger Tom. Salad|noIcon=1}}</pre>
|-
|{{ItemLink|Ginger Tom. Salad|noIcon=1}}
|-
| rowspan="3"| showName
| rowspan="3"| string
| rowspan="3"| Item-Name
|Overrides the Item-Name (alternative Name)
|-
|<pre>{{ItemLink|Ginger Tom. Salad|showName=Blattsalat}}</pre>
|-
|{{ItemLink|Ginger Tom. Salad|showName=Blattsalat}}
|-
| rowspan="3"| noLink
| rowspan="3"| boolean (1/0)
| rowspan="3"| show (0)
|Hide (1) or show (0) the Link
|-
|<pre>{{ItemLink|Chili Dog|noLink=1}}</pre>
|-
|{{ItemLink|Chili Dog|noLink=1}}
|-
| rowspan="3"| anchorOverride
| rowspan="3"| boolean (1/0)
| rowspan="3"| disabled (0)
|Internal use only (return the anchor-name if anchorOverride is 1) - overrides all other parameter except linkOverride
|-
|<pre>{{ItemLink|Geo-Data #3469|anchorOverride=1}}</pre>
|-
|{{ItemLink|Geo-Data #3469|anchorOverride=1}}
|-
|-
| rowspan="3"| linkOverride
| rowspan="3"| boolean (1/0)
| rowspan="3"| disabled (0)
|Internal use only (return the link if linkOverride is 1) - overrides all other parameter and anchorOverride
|-
|<pre>{{ItemLink|Geo-Data #3469|linkOverride=1}}</pre>
|-
|{{ItemLink|Geo-Data #3469|linkOverride=1}}
|-
| rowspan="3"| nowrap
| rowspan="3"| boolean (1/0)
| rowspan="3"| enabled (1)
|disable (0) or enable (1) Nowrap (prevent line breaks)
|-
|<pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</pre>
|-
|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|-
| rowspan="3"| noRename
| rowspan="3"| boolean (1/0)
| rowspan="3"| disabled (0)
|disable (0) or enable (1) noRename (prevent auto-rename)
|-
|<pre>noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}</pre>
|-
|noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}
|}


== Special Items ==
== Special Items ==
Line 100: Line 146:
|}
|}


== Default Item ==
== Invalid Item ==
If an item is misspelled, does not exist or simply has not been added to the template yet, it will show the default item image and link to the [[Items]] page ({{ItemLink|foo}}).
If an item is misspelled, does not exist or simply has not been added to the template will show a broken icon.


== Name ==
== Name ==
Names containing special characters are supported.
Names containing special characters (<code>#</code>) are not supported. Remove them and use <code>showName</code> for this characters.


It is possible that the name appears different than that entered one:
It is possible that the name appears different than that entered one:
<!-- please do not remove the repaced names (r) -->
<!-- please do not remove the repaced names (r) -->
<pre>{{ItemLink|Raw Steak}}</pre> Raw Steak will be displayed as {{ItemLink|Raw Steak}}. In these cases they are marked with an <sub>r</sub> (for renamed). All renamed Items will be listet in the category [[:Category:AutoRenamedItem|AutoRenamedItem]].
<pre>{{ItemLink|Rauser}}</pre> Rauser will be displayed as {{ItemLink|-Rauser|showName=-Rauser<sub>r</sub>}}. In these cases they are marked with an <sub>r</sub> (for renamed). All renamed Items will be listet in the category [[:Category:AutoRenamedItem|AutoRenamedItem]].


<pre>
<pre>
* {{ItemLink|Rauser}}
* {{ItemLink|Rauser}}
* {{ItemLink|-Rauser}}
* {{ItemLink|-Rauser}}
* {{ItemLink|Rauser NOEZ}}
* {{ItemLink|-Rauser NOEZ}}
* {{ItemLink|Rauser|showName=No Rauser}}
* {{ItemLink|Rauser|showName=No Rauser}}
* {{ItemLink|Rauser|noRename=1}}
* {{ItemLink|Rauser|noRename=1}}
</pre>
</pre>


* {{ItemLink|Rauser}}
* {{ItemLink|-Rauser|showName=-Rauser<sub>r</sub>}}
* {{ItemLink|-Rauser}}
* {{ItemLink|-Rauser}}
* {{ItemLink|Rauser NOEZ}}
* {{ItemLink|-Rauser NOEZ}}
* {{ItemLink|Rauser|showName=No Rauser}}
* {{ItemLink|Rauser|showName=No Rauser}}
* {{ItemLink|Rauser|noRename=1}}
* {{ItemLink|Rauser|noRename=1}}


Wikimedia supports [https://www.mediawiki.org/wiki/Help:Interwiki_linking#linktrail linktrail] which allows to add specific charaters to an link:
Wikimedia supports [https://www.mediawiki.org/wiki/Help:Interwiki_linking#linktrail linktrail] which allows to add specific characters to an link:


<pre>[[Hedgehag]]s</pre>
<pre>[[Hedgehag]]s</pre>
[[Hedgehag]]s
[[Hedgehag]]s
<pre>{{ItemLink|Veggie Set}}s</pre> results in {{ItemLink|Veggie Set}}s


Under specific conditions (parameter nowrap=0 is needed) Linktrail is supported by ItemLink:
Under specific conditions (parameter nowrap=0 is needed) Linktrail is supported by ItemLink:
Line 136: Line 180:
{{ItemLink|Veggie Set|nowrap=0}}s
{{ItemLink|Veggie Set|nowrap=0}}s


If nowrap is nessesary:
If nowrap is necessary:
<pre>{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}</pre>
<pre>{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}</pre>
{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}
{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}
Line 142: Line 186:
Linktrail and renamed Items:
Linktrail and renamed Items:
<pre>{{ItemLink|Rauser|nowrap=0}}s</pre>
<pre>{{ItemLink|Rauser|nowrap=0}}s</pre>
{{ItemLink|Rauser|nowrap=0}}s
{{ItemLink|-Rauser|showName=-Rauser<sub>r</sub>|nowrap=0}}s


== Item Lists ==
== Item Lists ==
Line 150: Line 194:
! Description
! Description
|-
|-
| [[Template:ItemLink/iconList]]
| [[Module:ItemLink/nameList]]
| Contains all Icons
|-
| [[Template:ItemLink/nameList]]
| Contains all Items which should be Renamed
| Contains all Items which should be Renamed
|-
|-
| [[Template:ItemLink/anchorList]]
| [[Module:ItemLink/levelList]]
| Contains all Items which anchor should be Renamed
| Contains all Level data
|-
|-
| [[Template:ItemLink/linkList]]
| [[Module:ItemLink/foodIconList]]
| Contains all Links to the Item Pages
| Contains all Food icons
|}
|}


Line 177: Line 218:
** Whitspace = _
** Whitspace = _
** English Item-names only
** English Item-names only
** Only user the special Charaters _ and -
** Only use the special characters _ and -
** Remove all other special Chars like ' . , # ; < > ( ) { } / \
** Remove all other special Chars like ' . , # ; < > ( ) { } / \
** Remove all - if they are at first position: -Item -> Item
** Remove all - if they are at first position: -Item -> Item
* Don't be shy. If there is a missing Item, add it.
* Don't be shy. If there is a missing Item, add it.


== Examples ==
{| class="wikitable"
! Code
! Result
|-
| <pre>{{ItemLink|Winterclaw}}</pre>
| {{ItemLink|Winterclaw}}
|-
| <pre>{{ItemLink|Geo-Data 3469|showName=Geo-Data #3469}}</pre>
| {{ItemLink|Geo-Data 3469|showName=Geo-Data #3469}}
|-
| <pre>{{ItemLink|Recruit's Scope}}</pre>
| {{ItemLink|Recruit's Scope}}
|-
| <pre>{{ItemLink|Ginger Tom. Salad|showName=Blattsalat|noLink=1}}</pre>
| {{ItemLink|Ginger Tom. Salad|showName=Blattsalat|noLink=1}}
|}
== Raw Example text ==
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. {{ItemLink|Thief's Key}} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{TemplateData}}
{{doc/end}}
{{doc/end}}
<includeonly>
[[Category:Link templates]]
</includeonly>

Latest revision as of 23:16, 9 May 2021

File:Template-info.svg Template Documentation

This is a template for adding links to items.

About

Add a link to the Item. There are many possibitities to customize the behavior.

Parameter

Item name

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Item Name 1

Item name

Default:
NULL
Example:
* {{ItemLink|Ginger Tom. Salad}}
* {{ItemLink|Edge o' All}}
String Required
Name Override showName

Shows the defined name/Overrides the Item-Name (alternative Name)

Default:
NULL
Example:
Blattsalat
{{ItemLink|Ginger Tom. Salad|showName=Blattsalat}}
String Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Hide and show elements

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
No Icon noIcon

Hides the Icon

Default:
0
Example:
* No Icon (<code>1</code>): {{ItemLink|Ginger Tom. Salad|noIcon=1}}
* Icon (<code>0</code>): {{ItemLink|Ginger Tom. Salad|noIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Ginger Tom. Salad}}
Boolean Optional
No Link noLink

Removes the link

Default:
0
Example:
* No Link (<code>1</code>): {{ItemLink|Chili Dog|noLink=1}}
* Link (<code>0</code>): {{ItemLink|Chili Dog|noLink=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}
Boolean Optional
No level noLevel

Hides the level

Default:
0
Example:
* Hide (<code>1</code>): {{ItemLink|Scrappy Plate|noLevel=1}}
* Show (<code>0</code>): {{ItemLink|Scrappy Plate|noLevel=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Scrappy Plate}}
Boolean Optional
Show Food Icon showFoodIcon

Show the food icon

Default:
0
Example:
* Show (<code>1</code>): {{ItemLink|Chili Dog|showFoodIcon=1}}
* Hide (<code>0</code>): {{ItemLink|Chili Dog|showFoodIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Wrap behavior

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Disable brakes nowrap

disable or enable Nowrap (prevent line breaks)

Default:
1
Example:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. LV11Scrappy Plate Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Custom Level

The associated equipment level is shown by default. Use the option only for an deviating equipment level or for adding a level to non equipment items.

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Level override level

Set a custom level to display.

Example:
Equipment:
LV02Edge o' All
LV17Scrappy Plate
LVL↑Old Geta
Other Item(s):
LV15Chili Dog
; Equipment:
: {{ItemLink|Edge o' All|level=2}}
: {{ItemLink|Scrappy Plate|level=17}}
: {{ItemLink|Old Geta|level=ascended}}
; Other Item(s):
: {{ItemLink|Chili Dog|level=15}}
[ Number | "ascended" ] Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Custom Food icon

The food icon is hidden by default see Hide and show elements for showing the associated food icon.

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Food icon override foodIcon

Set a custom food icon

Default:
NULL
Example:
Food: Chili Dog Other Item(s): LV11Scrappy Plate
Food: {{ItemLink|Chili Dog|foodIcon=FruitSalad_FoodIcon.png}} Other Item(s): {{ItemLink|Scrappy Plate|foodIcon=FruitSalad_FoodIcon.png}}
String Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Disable auto-rename

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
No Rename noRename

disable or enable noRename (prevent auto-rename)

Default:
0
Example:
noRename: LV01Rauser Rename: LV01-Rauserr
noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Return information (internal use)

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Level return (Data override) levelOverride

disable or enable levelOverride (return the level)

Default:
0
Example:
  • levelOverride: 11
levelOverride: {{ItemLink|Scrappy Plate|levelOverride=1}}
no levelOverride: {{ItemLink|Scrappy Plate|levelOverride=0}}
  • Other Item(s): (blank)
Other Item(s): {{ItemLink|Chili Dog|levelOverride=1}}(blank)
Boolean Optional
Level return (allow ascended) allowAscended

Allow returning ascended when levelOverride is 1.
Lua modules should use mw.loadData("Module:ItemLink/levelList") directly.

Default:
0
Example:
  • allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=1}}
    allowAscended: ascended
  • no allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=0}} (blank)
    no allowAscended: (blank)
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Special Items

Code Result
{{ItemLink|Health Pickup}}
Health Pickup

Invalid Item

If an item is misspelled, does not exist or simply has not been added to the template will show a broken icon.

Name

Names containing special characters (#) are not supported. Remove them and use showName for this characters.

It is possible that the name appears different than that entered one:

{{ItemLink|Rauser}}
Rauser will be displayed as LV01-Rauserr. In these cases they are marked with an r (for renamed). All renamed Items will be listet in the category AutoRenamedItem.
* {{ItemLink|Rauser}}
* {{ItemLink|-Rauser}}
* {{ItemLink|Rauser|showName=No Rauser}}
* {{ItemLink|Rauser|noRename=1}}

Wikimedia supports linktrail which allows to add specific characters to an link:

[[Hedgehag]]s

Hedgehags

{{ItemLink|Veggie Set}}s
results in Veggie Sets

Under specific conditions (parameter nowrap=0 is needed) Linktrail is supported by ItemLink:

{{ItemLink|Veggie Set|nowrap=0}}s

Veggie Sets

If nowrap is necessary:

{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}

Veggie Sets

Linktrail and renamed Items:

{{ItemLink|Rauser|nowrap=0}}s

LV01-Rauserrs

Item Lists

List Description
Module:ItemLink/nameList Contains all Items which should be Renamed
Module:ItemLink/levelList Contains all Level data
Module:ItemLink/foodIconList Contains all Food icons

Rules for the Item Lists

  • All Items should be sorted by Id (That ist the position of the Entry inside the item-database.json. Alternative: ItemViewer on Github) - Path to item-database.json:
    • Mac OS
      1. Open the .app package (Context Menu - show package)
      2. Navigate to Contents/Resources/app.nw/data/item-database.json
    • Windows
      1. Create a copy of your Game (.exe)
      2. Rename .exe to .zip
      3. Unpack the zip file
      4. Navigate to Contents/Resources/app.nw/data/item-database.json
  • Only subsections should be editied
  • Achor Nameing rules:
    • Whitspace = _
    • English Item-names only
    • Only use the special characters _ and -
    • Remove all other special Chars like ' . , # ; < > ( ) { } / \
    • Remove all - if they are at first position: -Item -> Item
  • Don't be shy. If there is a missing Item, add it.

Examples

Code Result
{{ItemLink|Winterclaw}}
LV26Winterclaw
{{ItemLink|Geo-Data 3469|showName=Geo-Data #3469}}
Geo-Data #3469
{{ItemLink|Recruit's Scope}}
LV11Recruit's Scope
{{ItemLink|Ginger Tom. Salad|showName=Blattsalat|noLink=1}}
Blattsalat

Raw Example text

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Thief's Key Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Test of raw TemplateData output:

No description.

Template parameters

ParameterDescriptionTypeStatus
Item Name1

Item name

Example
* <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Ginger Tom. Salad.png|24x24px]]</span>[[Ginger Tom. Salad|Ginger Tom. Salad]]</span>
  • <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>05</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Edge o' All.png|24x24px]]</span>[[Edge o' All|Edge o' All]]</span>
* {{ItemLink|Ginger Tom. Salad}}
* {{ItemLink|Edge o' All}}
Stringrequired
Name OverrideshowName

Shows the defined name/Overrides the Item-Name (alternative Name)

Example
<span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Ginger Tom. Salad.png|24x24px]]</span>[[Ginger Tom. Salad|Blattsalat]]</span>
{{ItemLink|Ginger Tom. Salad|showName=Blattsalat}}
Stringoptional
No IconnoIcon

Hides the Icon

Default
0
Example
* No Icon (<code>1</code>): <span class="nowrap" style="white-space:nowrap">[[Ginger Tom. Salad|Ginger Tom. Salad]]</span>
  • Icon (<code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Ginger Tom. Salad.png|24x24px]]</span>[[Ginger Tom. Salad|Ginger Tom. Salad]]</span>
  • Default (parameter not used / <code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Ginger Tom. Salad.png|24x24px]]</span>[[Ginger Tom. Salad|Ginger Tom. Salad]]</span>
* No Icon (<code>1</code>): {{ItemLink|Ginger Tom. Salad|noIcon=1}}
* Icon (<code>0</code>): {{ItemLink|Ginger Tom. Salad|noIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Ginger Tom. Salad}}
Booleanoptional
No LinknoLink

Removes the link

Default
0
Example
* No Link (<code>1</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>Chili Dog</span>
  • Link (<code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span>
  • Default (parameter not used / <code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span>
* No Link (<code>1</code>): {{ItemLink|Chili Dog|noLink=1}}
* Link (<code>0</code>): {{ItemLink|Chili Dog|noLink=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}
Booleanoptional
No levelnoLevel

Hides the level

Default
0
Example
* Hide (<code>1</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]]</span>
  • Show (<code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>11</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]]</span>
  • Default (parameter not used / <code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>11</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]]</span>
* Hide (<code>1</code>): {{ItemLink|Scrappy Plate|noLevel=1}}
* Show (<code>0</code>): {{ItemLink|Scrappy Plate|noLevel=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Scrappy Plate}}
Booleanoptional
Show Food IconshowFoodIcon

Show the food icon

Default
0
Example
* Show (<code>1</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkFood" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:ChiliDog FoodIcon.png]]</span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span>
  • Hide (<code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span>
  • Default (parameter not used / <code>0</code>): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span>
* Show (<code>1</code>): {{ItemLink|Chili Dog|showFoodIcon=1}}
* Hide (<code>0</code>): {{ItemLink|Chili Dog|showFoodIcon=0}}
* Default (parameter not used / <code>0</code>): {{ItemLink|Chili Dog}}
Booleanoptional
Disable brakesnowrap

disable or enable Nowrap (prevent line breaks)

Default
1
Example
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <span class="itemLinkLevel">LV<sub>11</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Booleanoptional
Level overridelevel

Set a custom level to display.

Example
Equipment
<span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>02</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Edge o' All.png|24x24px]]</span>[[Edge o' All|Edge o' All]]</span>
<span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>17</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]]</span>
<span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel ascended">LVL↑</span><span class="itemLinkIcon ascended" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Old Geta.png|26x26px]]</span>[[Old Geta|Old Geta]]</span>
Other Item(s)
<span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>15</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span>
; Equipment:
: {{ItemLink|Edge o' All|level=2}}
: {{ItemLink|Scrappy Plate|level=17}}
: {{ItemLink|Old Geta|level=ascended}}
; Other Item(s):
: {{ItemLink|Chili Dog|level=15}}
Contentoptional
Food icon overridefoodIcon

Set a custom food icon

Example
Food: <span class="nowrap" style="white-space:nowrap"><span class="itemLinkFood" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:FruitSalad_FoodIcon.png]]</span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Chili Dog.png|24x24px]]</span>[[Chili Dog|Chili Dog]]</span> Other Item(s): <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>11</sub></span><span class="itemLinkFood" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:FruitSalad_FoodIcon.png]]</span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]]</span>
Food: {{ItemLink|Chili Dog|foodIcon=FruitSalad_FoodIcon.png}} Other Item(s): {{ItemLink|Scrappy Plate|foodIcon=FruitSalad_FoodIcon.png}}
Stringoptional
No RenamenoRename

disable or enable noRename (prevent auto-rename)

Default
0
Example
noRename: <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>01</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Rauser.png|24x24px]]</span>[[Rauser|Rauser]]</span> Rename: <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>01</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:-Rauser.png|24x24px]]</span>[[-Rauser|-Rauser<sub>r</sub>]]</span>
noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}
Booleanoptional
Level return (Data override)levelOverride

disable or enable levelOverride (return the level)

Default
0
Example
* levelOverride: 11
levelOverride: {{ItemLink|Scrappy Plate|levelOverride=1}}
  • no levelOverride: <span class="nowrap" style="white-space:nowrap"><span class="itemLinkLevel">LV<sub>11</sub></span><span class="itemLinkIcon" style="image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;">[[File:Scrappy Plate.png|24x24px]]</span>[[Scrappy Plate|Scrappy Plate]]</span>
no levelOverride: {{ItemLink|Scrappy Plate|levelOverride=0}}
  • Other Item(s): (blank)
Other Item(s): {{ItemLink|Chili Dog|levelOverride=1}}(blank)
Booleanoptional
Level return (allow ascended)allowAscended

Allow returning <code>ascended</code> when <code>levelOverride</code> is <code>1</code>.<br />Lua modules should use <code>[[mw:Extension:Scribunto/Lua_reference_manual#mw.loadData|mw.loadData]]("[[Module:ItemLink/levelList]]")</code> directly.

Default
0
Example
*
allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=1}}
allowAscended: ascended
  • no allowAscended: {{ItemLink|Lifefiber Dress|levelOverride=1|allowAscended=0}} (blank)
    no allowAscended: (blank)
Booleanoptional