Template:ItemLink: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
allow the link text to be different from the link target
No edit summary
 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{nowrap|{{ItemSprite|{{{id|{{lc:{{#replace:{{{1|}}}| |-}}}}}}}|link={{{1|}}}}} [[{{{1|}}}|{{ #if: {{{2|}}} | {{{2}}} | {{{1|}}} }}]]}}<noinclude>
<includeonly>{{#invoke: SpriteFile | link
[[Category:Templates]]
}}</includeonly><noinclude>
{{documentation}}
<!-- Put categories/interwiki on the documentation page -->
</noinclude>
</noinclude>

Latest revision as of 11:59, 30 April 2025

Documentation[view] [edit] [history] [refresh]
This template uses Module:SpriteFile, a script written in Lua.

This template creates a page link with an associated sprite image on the left side using the format from Template:ItemSprite.

Parameters

Name Usage
|1= Set the defaults for all other parameters
|id= Sets the sprite. Spaces within this parameter are replaced with dashes and letters are made lowercase.
Value may be a name or a number, though names are preferred
|link= Set the page to link, supports internal and external links
If set to none, no link will be added
|text= or |2= Sets the text to be displayed

Word-ending links such as {{EntityLink|Creeper}}s will not include the suffix as part of the link text, unlike normal links. The text= or second unnamed argument should be used instead; i.e. {{EntityLink|Creeper|Creepers}}

Examples

Code Result
{{ItemLink|Pickaxe}} File:Pickaxe.pngPickaxe
{{ItemLink|Bread}} Bread
{{ItemLink|Apple}} Apple
{{ItemLink|Sugar}} Sugar
{{ItemLink|id=raw-fish|Fish}} File:Raw-fish.pngFish

Full list

Here is a full list of entities:

See also

Minecraft
Minecraft (legacy)
Minecraft Dungeons
Minecraft Legends
Minecraft Story Mode
A Minecraft Movie
Other

de:Vorlage:GegenstandLink es:Plantilla:EnlaceObjeto fr:Modèle:LienObjet it:Template:CollegamentoOggetto ja:テンプレート:ItemLink ko:틀:ItemLink lzh:模板:ItemLink nl:Sjabloon:VoorwerpLink pl:Szablon:ItemLink pt:Predefinição:ItemLink ru:Шаблон:Ссылка/Предмет th:แม่แบบ:ItemLink uk:Шаблон:Посилання/Предмет zh:Template:ItemLink

[view] [edit] [history] [refresh]The above documentation is transcluded from Template:ItemLink/doc.