Template:IngredientList: Difference between revisions

Add Meat-Based Meals
No edit summary
(Add Meat-Based Meals)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#arraydefine:ingredientArray| {{{1|}}} }}
<includeonly>{{#arraydefine:ingredientArray| {{{1|}}} }}
{{#arrayprint:ingredientArray|<br/>|@@@@| {{#switch:@@@@
{{#arrayprint:ingredientArray|<br/>|@@@@| {{#switch:@@@@
           |Fish
           |Fish
Line 5: Line 5:
           |Grains
           |Grains
           |Dairy and Oil
           |Dairy and Oil
          |Meat
           |Seafood
           |Seafood
           |Spices
           |Spices
           |Sweet
           |Sweets
           |Slush Ice
           |Ice
           |Vegetables={{ingredient|@@@@}}
           |Vegetables={{ingredient|@@@@}}
           |#default={{name|@@@@}}}} {{#switch:@@@@
          |Slush Ice={{name|@@@@}}
          |Egg-cellent Fruit
          |Spring V-EGG-etable
          |Wild Spring Egg=''{{name|@@@@}}''
           |#default={{name|@@@@}}}} {{#switch:{{{2|}}}
    |addCategories={{#switch:@@@@
           |Anglerfish
           |Anglerfish
           |Bass
           |Bass
Line 54: Line 60:
           |Peanut
           |Peanut
           |Soya
           |Soya
           |XXXXX=
           |Dairy and Oil=
           |Clam
           |Clam
           |Crab
           |Crab
Line 62: Line 68:
           |Shrimp
           |Shrimp
           |Squid
           |Squid
           |XXXXX=[[Category:Seafood-Based Meals]]
           |Seafood=[[Category:Seafood-Based Meals]]
           |Basil
           |Basil
           |Garlic
           |Garlic
Line 68: Line 74:
           |Mint
           |Mint
           |Oregano
           |Oregano
           |XXXXX=[[Category:Meals with Spices]]
           |Spices=[[Category:Meals with Spices]]
           |Cocoa Bean
           |Cocoa Bean
           |Sugarcane
           |Sugarcane
Line 92: Line 98:
           |Zucchini
           |Zucchini
           |Vegetables=[[Category:Vegetable-Based Meals]]
           |Vegetables=[[Category:Vegetable-Based Meals]]
           |#default=}}}}<noinclude>
          |Pork
          |Poultry
          |Venison=[[Category:Meat-Based Meals]]
          |Egg-cellent Fruit
          |Spring V-EGG-etable
          |Wild Spring Egg=[[Category:Limited Time]]
           |#default=}}
    |noCategories
    |#default=}}}}</includeonly><noinclude>
==Description==
This template is used to format the list of ingredients for a Meal with the appropriate '''''name''''' or '''''ingredient''''' template. Its intended use is on the Meal's page.
 
This template allows us to display Ingredients in Meal Recipes in a standardized format across the wiki, while still allowing the recipe on the Meal's page to be easily editable by any wiki contributor.
 
==Usage==
This template can be used by entering the following onto a relevant page:
 
<pre>{{IngredientList | <<Ingredient 1>>, <<Ingredient 2>>, <<Ingredient 3>>, <<Ingredient 4>>, <<Ingredient 5>> }}</pre>
 
Values should be entered as plain text, separated by commas, with no formatting or templates surrounding them. When providing "Any" ingredients, the possible values are: Dairy and Oil, Fish, Fruit, Grains, Ice, Seafood, Spices, Sweets, Vegetables.
 
There are also optional parameters that can be used:
<pre>{{IngredientList | <<Comma-separated Ingredient List>> | addCategories }}</pre>
 
If <code>addCategories</code> is provided, the template will add categories related to the ingredients contained in the Meal to the page (e.g. Fish-Based Meal, Fruit-Based Meal, etc.). Unless provided, no categories will be added to the page.
 
==Examples==
<pre>{{IngredientList | Vegetables, Mint | addCategories }}</pre>
results in... (note that the relevant categories are added to the page)
 
{{IngredientList | Vegetables, Mint | addCategories }}
 


{{IngredientList | Here and There Fish, Grains, Vegetables, Bell Pepper, Fruit | noCategories}}
<pre>{{IngredientList | Slush Ice, Lemon, Sugarcane, Vanilla, Clay }}</pre>
results in...


{{IngredientList | Vanilla, Sugarcane }}
{{IngredientList | Slush Ice, Lemon, Sugarcane, Vanilla, Clay }}


[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>
moderator
26,674

edits