Difference between revisions of "Template:RecipeInfobox"
m |
(added recipeSource variable for entering an optional source argument to the template. if left out, template uses {{PAGENAME}} to show current page's recipe, if entered it shows recipe of target page) |
||
Line 1: | Line 1: | ||
+ | {{#vardefine: recipeSource | {{{source|{{PAGENAME}}}}} }} | ||
<div class="recipe_template"> | <div class="recipe_template"> | ||
{| class="wikitable floatright" style="width:350px; font-size:100%;" | {| class="wikitable floatright" style="width:350px; font-size:100%;" | ||
Line 4: | Line 5: | ||
| colspan="2" style="background: lightgrey; text-align:center"| {{Emoticon|emoticon={{#show: {{PAGENAME}} |?CraftIcon}}}} '''Info:''' '''{{PAGENAME}}''' | | colspan="2" style="background: lightgrey; text-align:center"| {{Emoticon|emoticon={{#show: {{PAGENAME}} |?CraftIcon}}}} '''Info:''' '''{{PAGENAME}}''' | ||
|- | |- | ||
− | {{#switch:{{#show: {{ | + | {{#switch:{{#show: {{#var: recipeSource}} |?SkillCraft#}} |
|Crafting (Skill) | Alchemy (Skill) = | |Crafting (Skill) | Alchemy (Skill) = | ||
{{!}} style="text-align: right; {{!}} '''Corresponding [[Skill]]''' | {{!}} style="text-align: right; {{!}} '''Corresponding [[Skill]]''' | ||
− | {{!}} {{#show: {{ | + | {{!}} {{#show: {{#var: recipeSource}} |?SkillCraft}} |
{{!}}- | {{!}}- | ||
{{!}} style="text-align: right; {{!}} '''Skill level required''' | {{!}} style="text-align: right; {{!}} '''Skill level required''' | ||
− | {{!}} {{#show: {{ | + | {{!}} {{#show: {{#var: recipeSource}} |?SkillCraftLevel}} |
{{!}}- | {{!}}- | ||
}} | }} | ||
− | | style="text-align: right;" | '''Mana''' || {{#show: {{ | + | | style="text-align: right;" | '''Mana''' || {{#show: {{#var: recipeSource}} |?ManaCrafting}} [[Image:Mana.png|16px]] |
|- | |- | ||
− | | style="text-align: right;" | '''Chatcommand''' || <code>{{#show: {{ | + | | style="text-align: right;" | '''Chatcommand''' || <code>{{#show: {{#var: recipeSource}} |?CraftCommand}}</code> |
|- | |- | ||
| colspan="2" style="background: lightgrey; text-align:center"| '''Recipe''' | | colspan="2" style="background: lightgrey; text-align:center"| '''Recipe''' | ||
Line 22: | Line 23: | ||
|- | |- | ||
{{#ask: | {{#ask: | ||
− | [[-Has subobject::{{ | + | [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::Recipe (Item)]] |
| mainlabel=- | | mainlabel=- | ||
| headers=hide | | headers=hide | ||
Line 32: | Line 33: | ||
{{#ask: | {{#ask: | ||
− | [[-Has subobject::{{ | + | [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::Piece of Equipment]] |
| mainlabel=- | | mainlabel=- | ||
| headers=hide | | headers=hide | ||
Line 42: | Line 43: | ||
{{#ask: | {{#ask: | ||
− | [[-Has subobject::{{ | + | [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] |
| mainlabel=- | | mainlabel=- | ||
| headers=hide | | headers=hide |
Revision as of 11:32, 26 July 2018
Documentation
The template is used to create a table with an overview for crafting/brewing recipes. 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.