Difference between revisions of "Template:RecipeInfobox"

From ChatWars Wiki
Jump to: navigation, search
(formatting)
m (fix syntax error)
Line 57: Line 57:
 
}}
 
}}
  
{{#if {{#ask: [[-Has subobject::{{#var: recipeSource}}]] [[Personalized::Yes]] }}
+
{{#if: {{#ask: [[-Has subobject::{{#var: recipeSource}}]] [[Personalized::Yes]] }}
 
   | {{#if: {{#ask: [[-Has subobject::{{#var: recipeSource}}]] [[PersonalizedSetNr::1]] }}
 
   | {{#if: {{#ask: [[-Has subobject::{{#var: recipeSource}}]] [[PersonalizedSetNr::1]] }}
 
       | {{!}} colspan="2" style="text-align: center;" {{!}} '''Personalized Ingredient Set #1'''
 
       | {{!}} colspan="2" style="text-align: center;" {{!}} '''Personalized Ingredient Set #1'''
Line 63: Line 63:
 
<!-- -->{{!}} {{#ask:  
 
<!-- -->{{!}} {{#ask:  
 
               [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] [[Personalized::Yes]] [[PersonalizedSetNr::1]]
 
               [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] [[Personalized::Yes]] [[PersonalizedSetNr::1]]
                 | mainlabel=-
+
                 |mainlabel=-
                 | headers=hide
+
                 |headers=hide
 
                 |format=list
 
                 |format=list
 
                 |template=RecipeRow
 
                 |template=RecipeRow
Line 73: Line 73:
 
               }}
 
               }}
 
     }}
 
     }}
}}
 
{{#ask:
 
[[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] [[Personalized::Yes]] [[PersonalizedSetNr::1]]
 
| mainlabel=-
 
| headers=hide
 
|format=list
 
|template=RecipeRow
 
|sort=Qty
 
|order=desc
 
|? Crafting ingredient
 
|? Qty
 
}}
 
{{#ask:
 
[[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] [[Personalized::Yes]] [[PersonalizedSetNr::2]]
 
| mainlabel=-
 
| headers=hide
 
|format=list
 
|template=RecipeRow
 
|sort=Qty
 
|order=desc
 
|? Crafting ingredient
 
|? Qty
 
}}
 
{{#ask:
 
[[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] [[Personalized::Yes]] [[PersonalizedSetNr::3]]
 
| mainlabel=-
 
| headers=hide
 
|format=list
 
|template=RecipeRow
 
|sort=Qty
 
|order=desc
 
|? Crafting ingredient
 
|? Qty
 
 
}}
 
}}
  

Revision as of 21:06, 2 October 2020

Info: RecipeInfobox
Mana Mana.png
Chatcommand
Recipe
Ingredient (ID) Amount


Documentation

The template is used to create a table with an overview for crafting/brewing recipes. The template can be used in two modes:

  • No arguments: Using the template results in a table on the right hand side of the page, text wrapping around. It is advised to put that template directly in the beginning of a page to get the recipe as infobox.
  • Using arguments: possible arguments are source, align and collapsible. source defines which page the template should fetch the recipe from (default {{PAGENAME}}); alignment defines to where the table should be aligned (default: right); collapsible makes the table collapse (collapsed per default) with an [Expand]/[Collapse] button (default: empty, use "true" for activating). While the arguments can be mixed however you want (for example to just show the recipe of page X on page Y), but they have been made to be used in the Usage lists (Template:UsageList & Template:UsageListRow). There the template gets the arguments source=$AllItemPagesUsingThatResource (several {{PAGENAME}}), align=left, collapsible=true.