Feed The Beast Wiki

Follow the Feed The Beast Wiki on Discord or Mastodon!

READ MORE

Feed The Beast Wiki
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.
 
* '''tooltipstyle''': ''(Optional)'' Adds additional styling to the tooltip.
+
* '''class''': Adds a class to the cell.
* '''class''': ''(Optional)'' Adds a class to the cell wrapper.
+
* '''align''': Change vertical-alignment of cell to surrounding text.
* '''imgclass''': ''(Optional)'' Adds a class to the image wrapper.
+
* '''style''': Adds CSS styling to add to the cell.
* '''no-bg''': ''(Optional)'' Disables the cell background.
+
* '''numstyle''': Adds CSS styling to the number.
* '''default''': ''(Optional)'' Displays a default grid image in the background.
+
* '''no-bg''': Disables the cell background.
* '''link''': ''(Optional)'' Changes the article that the cell will link to. Set to "none" to disable links.
+
* '''link''': Changes the article that the cell will link to. Set to "none" to disable links.
* '''mod''': ''(Optional)'' 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.
+
* '''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''': ''(Optional)'' Sets whether the link goes to the item name (mod name) page, or just to the item name page. Goes to mod name page by default (dis=true), set to anything other than true for it to not.
+
* '''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

Template-info Documentation
Lua logo 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.