Quantcast Help:Tooltips - WoWWiki - Your guide to the World of Warcraft
Recent changes Random page
GAMING
Gaming
 
StarCraft Wiki
Super Smash Wiki
Halopedia
Diablo Wiki
FFXIclopedia
Grand Theft Wiki
See more...

Help:Tooltips

From WoWWiki

Jump to: navigation, search

On WoWWiki, there are several important templates that work together in a unique way to show tooltips when you mouseover a link (assuming you have JavaScript support in your browser).

Because of these special relationships, this help page will try to go further in-depth on how to use these templates so they work well together.

Contents

{{Item}}, {{Loot}} and {{Tooltip}}

If you want an item link to show a tooltip, you need to use the {{item}} or {{loot}} template. NOTE
Don't use {{item}} tooltip inside {{tooltip}} or {{settip}}.

To create a {{item}} link for an item, you can use the following format:

  • The only parameter required is the name of the item.
  • Include an |icon= argument to have an icon appear.

To create a {{loot}} link for an item, you can use the following format:

  • The template name indicates the item is loot.
  • The first argument is the quality of a given item (the exception is for enchants which should use "enchant").
  • The second argument is the name of a given item's article.
  • The third argument can be used to hide disambiguations, or different page names.
{{item}} Example Result {{loot}} Example Result
{{item|<Frostmourne>}}[Frostmourne] {{loot|<Artifact>|<Frostmourne>}}[Frostmourne]
{{item|<Warp Slicer>}}[Warp Slicer] {{loot|<Legendary>|<Warp Slicer>}}[Warp Slicer]
{{item|<Azuresong Mageblade>}}[Azuresong Mageblade] {{loot|<Epic>|<Azuresong Mageblade>}}[Azuresong Mageblade]
{{item|<Cruel Barb>}}[Cruel Barb] {{loot|<Rare>|<Cruel Barb>}}[Cruel Barb]
{{item|<Archeus>|<icon=>}} [Archeus] {{loot|<Uncommon>|<Archeus>}}[Archeus]
{{item|<Linen Cloth>|<icon=>}} [Linen Cloth] {{loot|<Common>|<Linen Cloth>}}[Linen Cloth]
{{item|<Poor-quality item>}}[Cedar Walking Stick] {{loot|<Poor>|<Poor-quality item>}}[Cedar Walking Stick]
{{loot|<enchant>|<Enchant Weapon - Fiery Weapon>}}[Enchant Weapon - Fiery Weapon]

If the item is on a disambiguation page, you can pass the page name as the second argument and the item name as the third argument:

{{item}} Example Result {{loot}} Example Result
{{item|<Corruption (sword)>|<Corruption>}}[Corruption] {{loot|<Rare>|<Corruption (sword)>|<Corruption>}}[Corruption]
If you want an item article to show a tooltip (and you know you do) when a loot link points to it, make sure to add a {{tooltip}} template with the following minimum parameters

To create a {{tooltip}} link for an item, you can use the following format:

  • The template name indicates the item has a tooltip.
  • The | mode= argument is a parameter value passed through from other templates.
  • The | args= argument is a parameter value passed through from other templates.
  • The | name= argument is the name of the item in the game.
  • The | quality= argument is the item quality, passed to {{quality}} to generate formatted item name.
  • The | bind= argument is the binding type: BoE, BoU or BoP.

So at minimum the tooltip should look like this:

<onlyinclude>{{tooltip
  | mode={{mode|}}
  | arg={{arg|}}
  | name=Cruel Barb
  | quality=Rare
  | bind=BoP
}}</onlyinclude>

See Template talk:Tooltip for complete details on all the various parameters to fill out a complete tooltip.

Things not to do
  • Don't make the width wider than 18em. The maximum supported width for hover tooltips is TBD.
  • Don't put extra linebreaks in your parameter contents:
    • Bad:
      | attrib=+4 Strength<br>
      +3 Agility<br>
      +5 Stamina
    • Good:
      | attrib=+4 Strength<br>+3 Agility<br>+5 Stamina
If an item article does not have a tooltip or the tooltip is improperly formatted or missing required parameters, the tooltip will show an error
Example (move your mouse pointer over the link)
[Imaginary item]
You can use the following item to test the contents of various {{tooltip}} parameters
[Test loot]

{{Mob}}

To show the image and basic info for an mob, use {{Mob}} to link to the mob page. This template just passes info to the {{NPC}} template below (faction= is always "Combat").

To create an {{Mob}} link for an mob, you can use the following format:

  • The template name indicates the target article is about a NPC.
  • The first argument is the name of the NPC's article.
  • The second argument is the title of the NPC.
Example Result
{{Mob|Alexander Calder|Warlock Trainer}}Combat Alexander Calder <Warlock Trainer>
{{Mob|Lord Victor Nefarius|Lord of Blackrock|level=??+}}Combat [??+] Lord Victor Nefarius <Lord of Blackrock>

T:Mobbox is deprecated. {{Npcbox}} should be used instead.

{{NPC}} and {{Npcbox}}

To show the image and basic info for an NPC or mob, use {{NPC}} to link to the NPC page.

To create an {{NPC}} link for an NPC, you can use the following format:

  • The template name indicates the target article is about a NPC.
  • The first argument is the faction the NPC belongs to (Alliance, Horde, or Neutral).
  • The second argument is the name of the NPC's article.
  • The third argument is the title of the NPC.
Example Result
{{NPC|Alliance|Alexander Calder|Warlock Trainer}}AAlliance Crest Alexander Calder <Warlock Trainer>
{{NPC||Andormu|Keepers of Time|level=70+}}[70+] Andormu <Keepers of Time>

Npcbox info to be added...

{{Quest}}, {{Questlong}}, or {{Questclass}}; and {{Questbox}}

Info to be added...

{{Coords}}

Info to be added...

Example Result
{{coords|78|18|Stormwind}}[78, 18]
{{coords|56|75|Durotar}}[55.8, 75.3]

For a list of map names to use, see Template:Coords/Maps.

How it works

The templates work in combination with a collection of Javascript to load the box, tooltip, or other relevant data for display. The mechanism was developed by Pcj.