Template:Recipes/doc

Query crafting recipes from database and display them as crafts table. The original source for the data can be found on the subpages of Recipes.

Usage
Parameters for query constraints:

List only recipes that using these stations.
 * = station1/station2/...

Exclude recipes that using these stations.
 * = station1/station2/...

List only recipes that will get this result item.It also possible to do pattern search using SQL LIKE syntax like this:, multiple: , note that "LIKE" must be all uppercase.
 * = result1/result2/...

Exclude recipes that will get this result item.It also possible to do pattern search using SQL LIKE syntax like this:, multiple: , note that "LIKE" must be all uppercase.
 * = result1/result2/...

List only recipes that contain this item in its ingredient list. You can use "Any xxx" as ingredient name for some alternative crafting ingredients group; and, if you query a item in one of substitutable item group, you will get "Any xxx" as well. Prefix name with "#" will turn this off on this item(and only on this item). For example, if you query by, you will get recipes as if you query by  ;   equals to  .It also possible to do pattern search using SQL LIKE syntax like this:  , multiple: , note that "LIKE" must be all uppercase.
 * = ingredient1/ingredient2/...

List only recipes that are exclusive to specified platforms. Please note this paramater require full-match, for example, If a recipes is exclusive to desktop and console, you must use (can be in diffenent order) to match it,  and   won't match it.
 * / = platform-platform-platform

NOTE: The relationship between above parameters is "and", and the relationship of multiple values inside single parameter is "or". For example,  means (in SQL style):

Raw input string for where parameter of cargo query. If specified, all of above parameters are ignored. Used to write complex queries when necessary, with caution.
 * = whereString

Other parameters:

The content of table caption.

Turn off result & ext cols grouping.
 * = n/no

If set, Crafting Station column will be hidden.
 * = y

If set, result item will show their internal item ID (if available).
 * = y

By default, this template will add transcluding page to crafting station category if crafting result is the page title itself. will disable this. will force categorization, no matter what the result and page title are.
 * = no/force

Set to  will make result item have no link.
 * = n/no

Assert the expected number of rows in this crafts table. If expected and actual number of rows are not equal, this page will be added to Category:Recipes_table_with_unexcepted_total_number_of_rows.
 * = number

Make the table unsortable.
 * = n/no

HTML class/id/style attributes for outer wrapper div element.

Example
Query for all Bone furniture. Select all recipes that have as one of its ingredient, and crafting station is, then exclude  from list. There are 18 items in Bone furniture, so we assert.

Register Recipes
Recipes in database are registered by recipes/register, all recipes should be registered on the corresponding crafting station page ( Recipes/[station] ), e.g. Recipes/Sawmill. For usage of recipes/register, see its document.

Custom Result Cells
= template name used for format result cell.

This template will receive following arguments:
 * ,,  : options for item template used by default display.
 * ,,  ,  ,  ,  ,  : infomation about crafting result.

"@@@@" in template output will be replaced with default result display.

See Chairs for example.

Custom Table Header

 * = content of result , default is
 * = content of ingredients , default is
 * = content of crafting station , default is

Adding extra columns/rows around crafting stations
Only valid when  not be set.

Define cols: ... Column headers before crafting station column

... Column headers before crafting station column

Define index key for row content: Define index key for "Furnace"(as  parameter), for example
 * = _a

Define actual contents: ... ... Define contents for  using index key.

Adding extra cols/rows around by crafting results
Define columns: ... ... ... ... The order in which all columns are displayed is: s •  •  s •   •  s •  s •   •  s •  s

Define index key for row content: Define index key for a row(Priority in this order): Define by row number Define by result name + version info Define by result name
 * = _a
 * = _a
 * = _a

Define actual contents: ... Define contents for  using index key, corresponds to the definition of columns.

Adding extra rows
NOTE: extra rows don't count into.

Before recipe rows: ... ...

After recipe rows: ... ...

See Bars and Recovery potions for examples.

Extract component
Some components of the recipe can be extracted and formatted separately, see recipes/extract.

Count for result rows
You can use recipes/exist and recipes/count to check the existence and number of results of recipes that meet query constraints. Note: you should use  to check existence instead of  , because the former is much faster and cheaper.

de:Vorlage:Recipes fr:Modèle:Recipes