Template:Dish Bucket Table: Difference between revisions
Appearance
No edit summary |
Added removed selection. Defaulted to not display removed dishes |
||
| Line 3: | Line 3: | ||
-->dishes.page_id=page_id, dishes.page_name=dish, dishes.quality=dish_quality, dishes.kitchenware=kitchenware, <!-- | -->dishes.page_id=page_id, dishes.page_name=dish, dishes.quality=dish_quality, dishes.kitchenware=kitchenware, <!-- | ||
-->dishes.category=category, dishes.type=type, dishes.cuisine=cuisine, dishes.strength=strength, <!-- | -->dishes.category=category, dishes.type=type, dishes.cuisine=cuisine, dishes.strength=strength, <!-- | ||
-->dishes.source=source, dishes.recipe_source=recipe_source, <!-- | -->dishes.source=source, dishes.recipe_source=recipe_source, dishes.removed=removed, <!-- | ||
-->recipes.item_1_quality=item_1_quality, recipes.item_1=item_1, <!-- | -->recipes.item_1_quality=item_1_quality, recipes.item_1=item_1, <!-- | ||
-->recipes.item_2_quality=item_2_quality, recipes.item_2=item_2, <!-- | -->recipes.item_2_quality=item_2_quality, recipes.item_2=item_2, <!-- | ||
| Line 10: | Line 10: | ||
-->recipes.recipe=recipe | -->recipes.recipe=recipe | ||
|join on = dishes.page_name=recipes.page_name | |join on = dishes.page_name=recipes.page_name | ||
|where = {{{where|<!-- | |where = {{{where|<!-- | ||
-->{{#if:{{{data|}}}|<!-- | -->{{#if:{{{data|}}}|<!-- | ||
| Line 20: | Line 16: | ||
-->OR source="{{{data}}}")<!-- | -->OR source="{{{data}}}")<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->}}} {{#if:{{{where|}}}{{{data|}}}|AND | -->}}} {{#if:{{{where|}}}{{{data|}}}|AND}} (removed="false") | ||
|filter = {{{filter|}}} | |filter = {{{filter|}}} | ||
|order by = {{{order_by|dish}}} | |order by = {{{order_by|dish}}} | ||
Revision as of 11:16, 11 May 2026
Template documentation
Note: parts of or the entire template might not be visible without values provided.
Note: parts of or the entire template might not be visible without values provided.
| Main | Documentation | Draft | Usage |
This template uses Module:BucketGet, a script written in Lua.
Template that creates a table of Dishes by querying data stored in Bucket:Dishes and Bucket:Recipes, which retrieve data from articles that use {{Dish Infobox}} and {{Recipe}}.
Syntax
{{Dish Bucket Table|data=}}
- id – Table ID for {{Filter}}.
- data – Single condition for querying data from Bucket:Dishes or Bucket:Recipes.
- where – Override data with more selective and multiple conditions for querying data.
- filter – Filter the output of the Bucket query.
- order_by – Order the output of the Bucket query. Default: dish.
- show_results_header – Set to false to hide the results header before the output. Default: true.
- results_header – Text for the results header. Defualt: Showing %TOTALRESULTS% data dish%ES%:.
Additional Parameters
- no_kitchenware – Set to 1 to hide the Kitchenware column.
- no_category – Set to 1 to hide the Category column.
- no_type – Set to 1 to hide the Type column.
- no_source – Set to 1 to hide the Source column.
Example
Selecting with Data
{{Dish Bucket Table|data=Strange Wheat}}
Lua error: Bucket recipes not found in query.
{{Dish Bucket Table|data=Drink|order_by=strength DESC, dish ASC|results_header=There are '''%TOTALRESULTS%''' [[Drink]] dish%ES%. In order of descending '''strength''':|no_type=1}}
Lua error: Bucket recipes not found in query.
Selecting with Where and Filter
{{Dish Bucket Table|where=(kitchenware!="Cooking Pot" AND dish_quality!="Green" AND category="Everyday Dishes")|no_source=1}}
Lua error: Bucket recipes not found in query.
{{Dish Bucket Table|where=(kitchenware!="Cooking Pot" AND dish_quality!="Green" AND category="Everyday Dishes")|filter=(dish CONTAINS "Skewers")|no_source=1}}
Lua error: Bucket recipes not found in query.