Widget:Account recipes

From Guild Wars 2 Wiki
Jump to navigationJump to search

Description

This widget determines which recipes a player has unlocked based on their API key. The widget should be used after any tables it is supposed to be affecting. Position the recipe control div wherever you wish.

Usage

<div id="recipecontrol"></div>{{#Widget:Account recipes}}

Example wikicode

<div id="recipecontrol"></div>

{| {{STDT}}
! Recipe ID per API
! Recipe name
|- id="recipes-2933"
| 2933
| Bowl of Apple Sauce
|- id="recipes-6470"
| 6470
| Bowl of Candy Corn Glaze
|}

{{Account recipes widget}}
<div id="recipecontrol"></div>

{| {{STDT|recipe sortable}}
! ID
! Recipe name
{{#arraymap:
{{#ask: [[Learned from recipe sheet::~Recipe: Sigil of*]]
    OR  [[Learned from recipe sheet::~Recipe: Rune of*]]
 | format = list | limit = 500 | headers = hide | link = none
}}|,|@@@|
{{!}}- id="recipes-{{#vardefineecho:id|{{#show:@@@| ?Has recipe id# | default = ''Missing'' }}}}"
{{!}} {{#var:id}}
{{!}} [[@@@]]
|\n}}
|}

{{Account recipes widget}}

Notes

  • This widget uses the recipe ID, not the item ID. This is stored in the semantic property "Property:Has recipe id", and is set in the recipe template using the id parameter.
  • This widget has a wrapper template, Template:Account recipes widget, which should be invoked such that widget usage can be tracked via whatlinkshere.