Template:ItemLink/doc: Difference between revisions
Streetclaw (talk | contribs) (Test pattern added) |
Streetclaw (talk | contribs) (New definition) |
||
Line 2: | Line 2: | ||
This is a template for adding links to items. | This is a template for adding links to items. | ||
== About == | |||
Add a link to the Item. There are many possibitities to customize the behavior. | |||
There are many possibitities to customize the behavior. | |||
== Parameter == | |||
{{TemplateData| | |||
{{TemplateData/entry|name=No Icon|param=noIcon|desc=Hides the Icon|def=0|example={{ItemLink|Ginger Tom. Salad|noIcon=1}} <pre>{{ItemLink|Ginger Tom. Salad|noIcon=1}}</pre>|type=Boolean|status=Optional}} | |||
{{TemplateData/entry|name=Show Name|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}} | |||
{{TemplateData/entry|name=No Link|param=noLink|desc=Removes the link|def=0|example={{ItemLink|Chili Dog|noLink=1}} <pre>{{ItemLink|Chili Dog|noLink=1}}</pre>|type=Boolean|status=Optional}} | |||
| | {{TemplateData/entry|name=Anchor Override|param=anchorOverride|desc=Internal use only (return the anchor-name) - overrides all other parameter except linkOverride and nowrap|def=0|example={{ItemLink|Geo-Data #3469|anchorOverride=1}} <pre>{{ItemLink|Geo-Data #3469|anchorOverride=1}}</pre>|type=Boolean|status=Optional}} | ||
| | {{TemplateData/entry|name=Link Override|param=linkOverride|desc=Internal use only (return the link) - overrides all other parameter and anchorOverride|def=0|example={{ItemLink|Geo-Data #3469|linkOverride=1}} <pre>{{ItemLink|Geo-Data #3469|linkOverride=1}}</pre>|type=Boolean|status=Optional}} | ||
| | {{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}} | ||
| | {{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|noRename=0}} <pre>noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}</pre>|type=Boolean|status=Optional}} | ||
}} | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
== Special Items == | == Special Items == | ||
Line 184: | Line 107: | ||
** 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}}</pre> | |||
| {{ItemLink|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}} | |||
|} | |||
{{doc/end}} | {{doc/end}} |
Revision as of 20:08, 29 December 2016
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
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
|
Boolean | Optional |
Show Name | showName
|
Shows the defined name/Overrides the Item-Name (alternative Name)
|
String | Optional |
No Link | noLink
|
Removes the link |
Boolean | Optional |
Anchor Override | anchorOverride
|
Internal use only (return the anchor-name) - overrides all other parameter except linkOverride and nowrap
|
Boolean | Optional |
Link Override | linkOverride
|
Internal use only (return the link) - overrides all other parameter and anchorOverride
|
Boolean | Optional |
Disable brakes | nowrap
|
disable or enable Nowrap (prevent line breaks)
|
Boolean | Optional |
No Rename | noRename
|
disable or enable noRename (prevent auto-rename) |
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
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
No Icon | noIcon | Hides the Icon
| Boolean | optional |
Show Name | showName | Shows the defined name/Overrides the Item-Name (alternative Name)
| String | optional |
No Link | noLink | Removes the link
| Boolean | optional |
Anchor Override | anchorOverride | Internal use only (return the anchor-name) - overrides all other parameter except linkOverride and nowrap
| Boolean | optional |
Link Override | linkOverride | Internal use only (return the link) - overrides all other parameter and anchorOverride
| Boolean | optional |
Disable brakes | nowrap | disable or enable Nowrap (prevent line breaks)
| Boolean | optional |
No Rename | noRename | disable or enable noRename (prevent auto-rename)
| Boolean | optional |
Special Items
Code | Result |
---|---|
{{ItemLink|Health Pickup}} |
![]() |
Default 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 (File:Foo.pngfoo).
Name
Names containing special characters are supported.
It is possible that the name appears different than that entered one:
{{ItemLink|Raw Steak}}Raw Steak will be displayed as

* {{ItemLink|Rauser}} * {{ItemLink|-Rauser}} * {{ItemLink|Rauser NOEZ}} * {{ItemLink|-Rauser NOEZ}} * {{ItemLink|Rauser|showName=No Rauser}} * {{ItemLink|Rauser|noRename=1}}
Wikimedia supports linktrail which allows to add specific charaters to an link:
[[Hedgehag]]s
Under specific conditions (parameter nowrap=0 is needed) Linktrail is supported by ItemLink:
{{ItemLink|Veggie Set|nowrap=0}}s
If nowrap is nessesary:
{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}
Linktrail and renamed Items:
{{ItemLink|Rauser|nowrap=0}}s
LV01-Rauserrs
Item Lists
List | Description |
---|---|
Template:ItemLink/iconList | Contains all Icons |
Template:ItemLink/nameList | Contains all Items which should be Renamed |
Template:ItemLink/anchorList | Contains all Items which anchor should be Renamed |
Template:ItemLink/linkList | Contains all Links to the Item Pages |
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
- Open the .app package (Context Menu - show package)
- Navigate to Contents/Resources/app.nw/data/item-database.json
- Windows
- Create a copy of your Game (.exe)
- Rename .exe to .zip
- Unpack the zip file
- Navigate to Contents/Resources/app.nw/data/item-database.json
- Mac OS
- Only subsections should be editied
- Achor Nameing rules:
- Whitspace = _
- English Item-names only
- Only user the special Charaters _ 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}} |
LV26![]() |
{{ItemLink|Geo-Data #3469}} |
![]() |
{{ItemLink|Recruit's Scope}} |
LV11![]() |
{{ItemLink|Ginger Tom. Salad|showName=Blattsalat|noLink=1}} |
![]() |