m (→Parameters: Added dis) |
No edit summary Tag: Template:No summary |
||
Line 1: | Line 1: | ||
{{Doc/Start}} |
{{Doc/Start}} |
||
+ | {{Lua|Grid}} |
||
This template is the display logic for grids. |
This template is the display logic for grids. |
||
== Parameters == |
== Parameters == |
||
+ | All parameters are optional. |
||
* '''1''': The name of the item to display. |
* '''1''': The name of the item to display. |
||
* '''2''': The amount of the item to display. |
* '''2''': The amount of the item to display. |
||
+ | * '''title''': Tooltip title override. |
||
− | * '''tooltiptext''': ''(Optional)'' Modifies the tooltip when hovering over the cell. Variables are supported: <code>$1</code>: The item name. <code>$2</code>: The amount of items. <code>$3</code>: Full mod name. |
||
+ | * '''desc''': Tooltip description override. |
||
− | * '''tooltipclass''': ''(Optional)'' Adds a class to the tooltip. |
||
− | * ''' |
+ | * '''class''': Adds a class to the cell. |
− | * ''' |
+ | * '''align''': Change vertical-alignment of cell to surrounding text. |
− | * ''' |
+ | * '''style''': Adds CSS styling to add to the cell. |
− | * ''' |
+ | * '''numstyle''': Adds CSS styling to the number. |
− | * ''' |
+ | * '''no-bg''': Disables the cell background. |
− | * '''link''': |
+ | * '''link''': Changes the article that the cell will link to. Set to "none" to disable links. |
− | * '''mod''': |
+ | * '''mod''': Sets the item mod, if not provided, an extension will attempt to find the correct image to display. You can use both the mod abbreviation as defined in [[Template:G/Mods]] or the full mod name. |
− | * '''dis''': |
+ | * '''dis''': If set, the link points directly to the item name, otherwise points to the disambiguated item name "Item name (Mod name)" if '''mod''' is set. |
== Usage == |
== Usage == |
Revision as of 04:13, 6 February 2015
This template uses Module:Grid, a script written in Lua. Please see wikipedia:wp:Lua and mw:Extension:Scribunto to learn more. |
This template is the display logic for grids.
Parameters
All parameters are optional.
- 1: The name of the item to display.
- 2: The amount of the item to display.
- title: Tooltip title override.
- desc: Tooltip description override.
- class: Adds a class to the cell.
- align: Change vertical-alignment of cell to surrounding text.
- style: Adds CSS styling to add to the cell.
- numstyle: Adds CSS styling to the number.
- no-bg: Disables the cell background.
- link: Changes the article that the cell will link to. Set to "none" to disable links.
- mod: Sets the item mod, if not provided, an extension will attempt to find the correct image to display. You can use both the mod abbreviation as defined in Template:G/Mods or the full mod name.
- dis: If set, the link points directly to the item name, otherwise points to the disambiguated item name "Item name (Mod name)" if mod is set.
Usage
When creating grids, using the {{G}}
template is recommended over using this template. But if you want to bypass the ore dictionary, you can use this template instead. {{Gc}}
also acts as an shortcut to this template and should be used when creating grids in a crafting table.
Examples
Code | Result | Comment |
---|---|---|
{{Gc|TNT|10}} |
10 |
Normal usage |
{{Gc|Copper Ingot|mod=TE|4|tooltiptext=$2 $1s<br/>($3)|tooltipstyle=color:#FF5;|link=Thermal Expansion}} |
4 |
Extended usage of tooltip variables. |
This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.