Шаблон:Recipe table — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
 
Строка 1: Строка 1:
<includeonly>{{#ask:[[Requires rating::>{{{min rating|0}}}]]
+
<includeonly>{{#ask:
      [[Requires rating::<{{{max rating|500}}}]]
+
  [[Requires rating::>{{{min rating|0}}}]]
      {{#if:{{{discipline|}}}|[[Requires discipline::{{{discipline}}}]]}}
+
  [[Requires rating::<{{{max rating|500}}}]]
      {{#if:{{{type|}}}|[[Has recipe type::{{{type}}}]]}}
+
  {{#if:{{{discipline|}}}|[[Requires discipline::{{{discipline}}}]]}}
      {{#if:{{{ingredient|}}}|[[Has ingredient::?;{{{ingredient}}}]]}}
+
  {{#if:{{{type|}}}|[[Has recipe type::{{{type}}}]]}}
      {{#if:{{{source|}}}|[[Has recipe source::{{{source}}}]]}}
+
  {{#if:{{{ingredient|}}}|[[Has ingredient::?;?;{{#titleparts:{{{ingredient}}}}}]]}}
      {{#if:{{{item name|}}}|[[Has item data object.Has canonical name::~*{{{item name}}}*]]}}
+
  {{#if:{{{source|}}}|[[Has recipe source::{{{source}}}]]}}
      {{#if:{{{item type|}}}|[[Has item data object.Has item type::{{{item type}}}]]}}
+
  {{#if:{{{sheet|}}}|[[Learned from recipe sheet::{{{sheet}}}]]}}
      {{#if:{{{timegate|}}}|[[Is time gated::Y]]}}
+
  {{#if:{{{item name|}}}|[[Has item data object.Has canonical name::~*{{{item name}}}*]]}}
 +
  {{#if:{{{item type|}}}|[[Has item data object.Has item type::{{{item type}}}]]}}
 +
  {{#if:{{{timegate|}}}|[[Is time gated::Y]]}}
 +
  {{#if:{{{other|}}}|{{{other}}}}}
 
|?Requires discipline
 
|?Requires discipline
 
|?Requires rating
 
|?Requires rating
Строка 13: Строка 16:
 
|?Has output quantity
 
|?Has output quantity
 
|?Has item data object
 
|?Has item data object
 +
|?Learned from recipe sheet
 
| link = none
 
| link = none
 
| format = template
 
| format = template
Строка 18: Строка 22:
 
| intro = {{Recipe list header|source={{{source}}}}} <!-- Hides ratings for Mystic Forge source -->
 
| intro = {{Recipe list header|source={{{source}}}}} <!-- Hides ratings for Mystic Forge source -->
 
| outro = {{!}}}
 
| outro = {{!}}}
| sort = Requires rating, Has item data object<!-- Mystic Forge recipes have rating of 0 generally -->
+
| sort = {{{sort|Requires rating, Has item data object}}}
 
| sortorder = descending
 
| sortorder = descending
| limit = 200
+
| limit = {{{limit|200}}}
 +
| offset = {{{offset|0}}}
 
| default = No recipes found that match the constraints of the query.
 
| default = No recipes found that match the constraints of the query.
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 +
 
== Usage ==
 
== Usage ==
Generates a list of recipes based on the input parameters. Format using {{tl|recipe list header}} and {{tl|recipe list result format}}.
+
Generates a list of recipes based on the input parameters. Format using {{tl|recipe list header}} and {{tl|recipe list result format}}.
  
 
<pre>
 
<pre>
Строка 33: Строка 39:
 
| ingredient =
 
| ingredient =
 
| source =
 
| source =
 +
| sheet =
 
| type =
 
| type =
 
| item type =  
 
| item type =  
Строка 40: Строка 47:
  
 
== Parameters ==
 
== Parameters ==
All parameters are used as criteria for certain properties within the semantic query.
 
 
{| {{STDT}}
 
{| {{STDT}}
 
! Parameter || Maps to property  
 
! Parameter || Maps to property  
Строка 53: Строка 59:
 
|-
 
|-
 
| source || [[Property:Has recipe source]]
 
| source || [[Property:Has recipe source]]
 +
|-
 +
| sheet || [[Property:Learned from recipe sheet]]
 
|-
 
|-
 
| type || [[Property:Has recipe type]]
 
| type || [[Property:Has recipe type]]
Строка 61: Строка 69:
 
|-
 
|-
 
| timegate || [[Property:Is time gated]]
 
| timegate || [[Property:Is time gated]]
 +
|-
 +
| other || ''Use sparingly to target other properties not listed above.''
 
|}
 
|}
 +
;sort
 +
: Determines the sort property. Defaults to "Requires rating, Has item data object".
 +
;limit
 +
: Defines the maximum number of results to return.
 +
;offset
 +
: Allows navigation beyond limit.
  
 
== Examples ==
 
== Examples ==

Текущая версия на 15:17, 3 апреля 2018


Usage[править]

Generates a list of recipes based on the input parameters. Format using {{recipe list header}} and {{recipe list result format}}.

{{recipe table
| min rating =
| max rating =
| discipline =
| ingredient =
| source =
| sheet = 
| type =
| item type = 
| timegate =
}}

Parameters[править]

Parameter Maps to property
min rating Property:Requires rating (minimum value)
max rating Property:Requires rating (maximum value)
discipline Property:Requires discipline
ingredient Property:Has ingredient
Redirect Arrow.pngProperty:Has ingredient name
source Property:Has recipe source
sheet Property:Learned from recipe sheet
type Property:Has recipe type
item type Property:Has item data objectProperty:Has item type
item name Property:Has item data objectProperty:Has canonical name
timegate Property:Is time gated
other Use sparingly to target other properties not listed above.
sort
Determines the sort property. Defaults to "Requires rating, Has item data object".
limit
Defines the maximum number of results to return.
offset
Allows navigation beyond limit.

Examples[править]

Rating, discipline, and type[править]

{{recipe table
| min rating = 0
| max rating = 25
| discipline = chef
| type = Soup
}}
Item Rarity Discipline(s) Rating Ingredients
Bowl of Red Meat Stock.png Bowl of Red Meat Stock Z ChefChef tango icon 20px.png 0
2
[[|link=Морковь|20x20px]] Морковь
2
Onion.png Onion
1
Jug of Water.png Jug of Water
2
Slab of Red Meat.png Slab of Red Meat

Source and ingredient[править]

{{recipe table
| source = Mystic forge
| ingredient = Orichalcum Ingot
}}

No recipes found that match the constraints of the query.