Template:Barter

From Lotro-Wiki.com
Jump to navigation Jump to search
This is the template documentation for {{Barter}}. It is transcluded from Template:Barter/doc and may be directly edited there.

Usage

This template will generate an icon-link pair for an item and is normally used in tables such as the "Items to trade" / "Items to receive" tables on barter NPCs pages such as Gaellien. This template is similar to {{Reward}}, but is better suited for use in tables because the icons can be left-floated to improve the text flow. Unlike Reward, this template will not automatically detect generic icons, so you may need to use the icon= parameter; see the examples below.

{{Barter | <item> | [rename=]<what to display> | [float=]<left or right> | icon=<icon name> }}

Parameters

<item>
(positional, required) The name of the item to link, without the "Item:" prefix..
rename
(keyword or positional) If set, this will be displayed in the link instead of the above (although the link will still point to the correct item page). Use this to make the name plural and/or add a number.
float
(keyword or positional) If set to "left" or "right", the icon will be floated to that side of the containing element. Set this to "left" in narrower table cells, for example, to force long item names to line up better with the icon. Values other than "left", "right", "center", or "none" may have unexpected behavior. (See MediaWiki image syntax
icon
(keyword) If unset, the template will look for an icon with the same name as in <item> above. Use this parameter to override that behavior (e.g., in the case of a generic icon) and identify the correct icon to use. Leave off the -icon.png extension.

Examples

With keywords:

  • {{Barter|Mark of Aughaire Victory|rename=2 Marks of Aughaire Victory}}
  • {{Barter|Mark of Aughaire Victory|rename=2 Marks of Aughaire Victory|float=left}}

Without keywords:

  • {{Barter|Mark of Aughaire Victory|2 Marks of Aughaire Victory}}
  • {{Barter|Mark of Aughaire Victory|2 Marks of Aughaire Victory|right}}

Using icon=:

  • {{Barter|The Book of Knives|icon=Book 1 (incomparable)}}
Trade
2 Marks of Aughaire Victory
2 Marks of Aughaire Victory
2 Marks of Aughaire Victory
2 Marks of Aughaire Victory
The Book of Knives

A full working example:

{| class="altRowsMed" style="text-align:left; width:600px;" 
! colspan="2" | Acquaintance - Currency and Consumables
|-
! style="text-align:center; width:300px;" | Item to Receive
! style="text-align:center; width:300px;" | Items to Trade
|- 
| {{Barter|Eastemnet Milkthistle Draught|3 Eastemnet Milkthistle Draughts}} || {{Barter|Wildermore Coin|10 Wildermore Coins|icon=Silver Token of the Riddermark}}
|- 
| {{Barter|Eastemnet Lhinestad Draught|3 Eastemnet Lhinestad Draughts}} || {{Barter|Wildermore Coin|10 Wildermore Coins|icon=Silver Token of the Riddermark}}
|- 
| {{Barter|Eastemnet Healing Draught|3 Eastemnet Healing Draughts}} || {{Barter|Wildermore Coin|10 Wildermore Coins|icon=Silver Token of the Riddermark}}
|- 
| {{Barter|Eastemnet Conhuith Draught|3 Eastemnet Conhuith Draughts}} || {{Barter|Wildermore Coin|10 Wildermore Coins|icon=Silver Token of the Riddermark}}
|- 
| {{Barter|Swamp Cabbage|3 Swamp Cabbage}} || {{Barter|Wildermore Coin|10 Wildermore Coins|icon=Silver Token of the Riddermark}}
}}

Yields this table:

Acquaintance - Currency and Consumables
Item(s) to Receive Items to Trade
3 Eastemnet Milkthistle Draughts 10 Wildermore Coins
3 Eastemnet Lhinestad Draughts 10 Wildermore Coins
3 Eastemnet Healing Draughts 10 Wildermore Coins
3 Eastemnet Conhuith Draughts 10 Wildermore Coins
3 Swamp Cabbage 10 Wildermore Coins