Template:Inventory slot/doc: Difference between revisions

From BTA-Mirror
imported>Ttv pedro270707
mNo edit summary
imported>Ttv pedro270707
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This template allows for the creation of Minecraft inventory slots. The slots can either be empty or contain an item. They can also be rescaled.
This template allows for the creation of Minecraft inventory slots. The slots can either be empty or contain an item. They can also be rescaled.


== Arguments ==
{| class="wikitable"
! Argument !! Default value !! Note
|-
| <code>item</code> || ''None'' || Defines the item that should be shown on the slot. By default, no item is displayed.
|-
| <code>width</code> || <code>32</code> || Sets the width of the slot in pixels. Note that only the item area is counted, and not the border.
|-
| <code>height</code> || <code>32</code> || Sets the height of the slot in pixels. Note that only the item area is counted, and not the border.
|-
| <code>link</code> || <code>y</code> if the item is not the page's name, <code>n</code> otherwise || Sets the link. Can either be a boolean (<code>y</code> or <code>n</code>) or the name of a page.
|}
== Usage ==
== Usage ==
<code><nowiki>{{Inventory slot}}</nowiki></code> gives:
<code><nowiki>{{Inventory slot}}</nowiki></code> gives:
Line 14: Line 26:
{{Inventory slot|item=Steel Ingot|width=36|height=36}}
{{Inventory slot|item=Steel Ingot|width=36|height=36}}


[[Category:Pages using DynamicPageList3 dplvar parser function]]
<code><nowiki>{{Inventory slot|item=Steel Ingot|link=n}}</nowiki></code> gives:
 
{{Inventory slot|item=Steel Ingot|link=n}}
 
<code><nowiki>{{Inventory slot|item=Steel Ingot|link=Gold Nugget}}</nowiki></code> gives:
 
{{Inventory slot|item=Steel Ingot|link=Gold Nugget}}

Latest revision as of 14:31, 28 March 2023

This template allows for the creation of Minecraft inventory slots. The slots can either be empty or contain an item. They can also be rescaled.

Arguments[edit source]

Argument Default value Note
item None Defines the item that should be shown on the slot. By default, no item is displayed.
width 32 Sets the width of the slot in pixels. Note that only the item area is counted, and not the border.
height 32 Sets the height of the slot in pixels. Note that only the item area is counted, and not the border.
link y if the item is not the page's name, n otherwise Sets the link. Can either be a boolean (y or n) or the name of a page.

Usage[edit source]

{{Inventory slot}} gives:

{{Inventory slot|item=Steel Ingot}} gives:

{{Inventory slot|item=Steel Ingot|width=36|height=36}} gives:

{{Inventory slot|item=Steel Ingot|link=n}} gives:

{{Inventory slot|item=Steel Ingot|link=Gold Nugget}} gives: