Difference between revisions of "Template:RecipeInfobox"

From ChatWars Wiki
Jump to: navigation, search
Line 3: Line 3:
 
-->{{#vardefine: collaps | {{#ifeq: {{{collapsible|}}} | true | mw-collapsible mw-collapsed <!--" SEE CAPS LOCKED COMMENT IN NEXT LINE id="mw-customcollapsible-recipeCollaps"--> | }} }}<!--
 
-->{{#vardefine: collaps | {{#ifeq: {{{collapsible|}}} | true | mw-collapsible mw-collapsed <!--" SEE CAPS LOCKED COMMENT IN NEXT LINE id="mw-customcollapsible-recipeCollaps"--> | }} }}<!--
 
--><!--THIS IS COMMENTED OUT BECAUSE IT SHOULD WORK, BUT IT DOESN'T DUE TO WHAT'S *PROBABLY* A BUG {{#if: {{{collapsible|}}} | <div class="mw-customtoggle-recipeCollaps" style="cursor:pointer; color:highlight">(Toggle Recipe)</div> }}-->
 
--><!--THIS IS COMMENTED OUT BECAUSE IT SHOULD WORK, BUT IT DOESN'T DUE TO WHAT'S *PROBABLY* A BUG {{#if: {{{collapsible|}}} | <div class="mw-customtoggle-recipeCollaps" style="cursor:pointer; color:highlight">(Toggle Recipe)</div> }}-->
<div class="recipe_template {{#var: collaps}}">;&nbsp;
+
<div class="recipe_template {{#var: collaps}}">
 
{| class="wikitable {{#var: alignment}}" style="width:350px; font-size:100%;"
 
{| class="wikitable {{#var: alignment}}" style="width:350px; font-size:100%;"
 
|-
 
|-
Line 62: Line 62:
 
__NOTOC__
 
__NOTOC__
 
=Documentation=
 
=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.
+
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 <code>source</code>, <code>align</code> and <code>collapsible</code>. <code>source</code> defines which page the template should fetch the recipe from (default {{PAGENAME}}); <code>alignment</code> defines to where the table should be aligned (default: right);  <code>collapsible</code> 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 {{PAGENAMES}}), align=left, collapsible=true.
  
  

Revision as of 15:54, 26 July 2018

Info: RecipeInfobox
Mana Mana.png
Chatcommand
Recipe
Ingredient 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 RecipeInfobox); 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 Template:PAGENAMES), align=left, collapsible=true.