Template:Elinks

From Warcraft Wiki
Jump to navigation Jump to search

A wrapper template for use in creating external links templates, such as {{Elinks-spell}}.

Uses the classic variable, defined by {{Classic only}}, to automatically choose a subdomain (for example, the "classic" in "classic.wowhead.com").

Syntax

Common parameters, with pre-filled text. Most elinks templates will use the pre-filled text or similar. The ellipses (...) are placeholder and will change with each template.

{{Elinks
|id={{{1|}}}
|sub={{{sub|}}}
|type=...
|wh=...{{=}}{{{1}}}
|wdb=.../{{{1}}}
|whsearch=...
|wdbsearch=...
|doc={{{doc|-}}}
}}

Additional parameters: search, whsearchpage, extralink, extraname, extraclass.

Required parameters

  • id — Used to pass an ID from the child template to this template.
  • sub — Allows a subdomain to be manually specified, instead of automatically chosen. This should be left as-is for most templates.
  • type — The type of thing the child template represents: "spell," "NPC," etc. Used as part of the category name for pages missing an ID, e.g. Category:Articles which need to have spell ID specified or Category:Articles which need to have NPC ID specified.
  • wh — The part of the Wowhead URL that comes after ".com/". The numbered parameter should match the parameter used for id above. Use {{=}} in place of =, or the template won't work.
  • wdb — The part of the WoWDB URL that comes after ".com/". The numbered parameter should match the parameter used for id above. Omit this to remove the WoWDB link in cases where WoWDB doesn't have pages for something.
  • doc — Leave as-is. Allows the child template to use |doc= to suppress the "missing ID" category.

Optional parameters

  • whsearch — Used to specify a tab on Wowhead's search page, in case an ID isn't given. On Wowhead, this part comes after #.
  • wdbsearch — Used to specify a tab on WoWDB's search page, in case an ID isn't given. On WoWDB, this part comes after t1:. To be used at the same time as whsearch.
  • search — Used to specify a tab on each site's search page. This parameter is used instead of the two above in cases where both Wowhead and WoWDB use the exact same word or phrase, e.g. "npcs."

These parameters will tend to be uncommonly used:

  • whsearchpage — Used to change the Wowhead search link to a specific page. This is for things that don't show up on Wowhead's normal search page. For example, |whsearchpage=icons will go to "www.wowhead.com/icons".
  • extralink — An extra link that isn't coded in by default. Include the full url except the https://.
  • extraname — Website name for the extra link. For example, "Petopia" or "WarcraftPets".
  • extraclass — Adds an icon for the extra link. Options include "wowhead", "wowheadc", "sigrie", "petopia", "warcraftpets", "wowus", "allakhazam", and "thottbot".