Pergi ke kandungan

Templat:Infobox Recipe Begin/doc

Daripada Wikibuku

This recipe infobox supports a very large number of fields, including some specialty fields that will rarely be used. Some fields simply don't make sense in some cases. Some different sets of code have been prepared using only the most common fields. Select the most appropriate set below and copy and paste the entire code to the top of a recipe article, then fill in as many fields as possible. Empty fields should generally be kept so that a future editor can fill them in unless they make no sense for the recipe in question.

If you have ideas for improvements or would like to add brand new fields to these templates, please post on Template talk:Infobox Recipe Begin to discuss the changes and how they should be implemented.

Usage

[sunting]

Code for most recipes

[sunting]

For infoboxes of individual recipes, please copy the appropriate example for that recipe:

Abbreviated code, doesn't include all possible categories in {{Infobox Recipe Summary}}.
{|{{Infobox Recipe Begin}}
{{Infobox Recipe Image
| Image               = [[File:Example.jpg|center|300px|Alt text]]
| Caption             = Caption text
}}
{{Infobox Recipe Summary
|Time                 =              | <!-- ex. "5 minutes" -->
|Rating               =              | <!-- number from 1-5 -->
|                                      <!-- categories can go from 1 to 9 -->
|Type1                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type2                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Ingredient1          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient2          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Technique1           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique2           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Diet1                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet2                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Origin1              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin2              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
}}
{{Infobox Recipe Nutrition
|Reference            =              | <!-- citation for nutrition information -->
|ServingSize          =
|Servings             = 
|Calories             = 
|Protein              = 
|Carbohydrates        = 
|  Fiber              = 
|  Starch             =
|  Sugars             = 
|TotalFat             = 
|  SaturatedFat       = 
|  TransFat           = 
|  MonoFat            = 
|  PolyFat            = 
|    Omega3           =   | <!-- in milligrams -->
|    Omega6           =   | <!-- in milligrams -->
|  Cholesterol        = 
| <!-- --- Vitamins --- -->
|VitaminA             = 
|Folate               = 
|VitaminB1            =   | <!-- a.k.a. Thiamine          -->
|VitaminB2            =   | <!-- a.k.a. Riboflavin        -->
|VitaminB3            =   | <!-- a.k.a. Niacin            -->
|VitaminB5            =   | <!-- a.k.a. Panthothenic Acid -->
|VitaminB6            =   | <!-- a.k.a. Pyridoxine        -->
|VitaminB12           =   | <!-- a.k.a. Cyanocobalamin    -->
|VitaminC             = 
|VitaminD             = 
|VitaminE             = 
|VitaminK             = 
| <!-- --- Minerals --- -->
|Calcium              = 
|Copper               = 
|Iron                 = 
|Magnesium            = 
|Manganese            = 
|Phosphorus           = 
|Potassium            = 
|Selenium             = 
|Sodium               =  | <!-- in milligrams -->
|Zinc                 = 
}}
|}
Full code
{|{{Infobox Recipe Begin}}
{{Infobox Recipe Image
| Image               = [[File:Example.jpg|center|300px|Alt text]]
| Caption             = Caption text
}}
{{Infobox Recipe Summary
|Time                 =              | <!-- ex. "5 minutes" -->
|Rating               =              | <!-- number from 1-5 -->
|Type1                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type2                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type3                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type4                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type5                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type6                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type7                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type8                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type9                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Ingredient1          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient2          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient3          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient4          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient5          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient6          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient7          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient8          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient9          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Technique1           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique2           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique3           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique4           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique5           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique6           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique7           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique8           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique9           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Diet1                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet2                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet3                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet4                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet5                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet6                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet7                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet8                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet9                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Origin1              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin2              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin3              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin4              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin5              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin6              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin7              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin8              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin9              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
}}
{{Infobox Recipe Nutrition
|Reference            =              | <!-- citation for nutrition information -->
|ServingSize          =
|Servings             = 
|Calories             = 
|Protein              = 
|Carbohydrates        = 
|  Fiber              = 
|  Starch             =
|  Sugars             = 
|TotalFat             = 
|  SaturatedFat       = 
|  TransFat           = 
|  MonoFat            = 
|  PolyFat            = 
|    Omega3           =    | <!-- in milligrams -->
|    Omega6           =    | <!-- in milligrams -->
|  Cholesterol        = 
| <!-- --- Vitamins --- -->
|VitaminA             = 
|Folate               = 
|VitaminB1            =   | <!-- a.k.a. Thiamine          -->
|VitaminB2            =   | <!-- a.k.a. Riboflavin        -->
|VitaminB3            =   | <!-- a.k.a. Niacin            -->
|VitaminB5            =   | <!-- a.k.a. Panthothenic Acid -->
|VitaminB6            =   | <!-- a.k.a. Pyridoxine        -->
|VitaminB12           =   | <!-- a.k.a. Cyanocobalamin    -->
|VitaminC             = 
|VitaminD             = 
|VitaminE             = 
|VitaminK             = 
| <!-- --- Minerals --- -->
|Calcium              = 
|Copper               = 
|Iron                 = 
|Magnesium            = 
|Manganese            = 
|Phosphorus           = 
|Potassium            = 
|Selenium             = 
|Sodium               =  | <!-- in milligrams -->
|Zinc                 = 
}}
|}

Example

[sunting]
colspan="2" Templat:Recipe Infobox Style |
Hamburger sandwich with bun and condiments
Hamburger sandwich with bun and condiments
Templat:Cookbook other
A hamburger sandwich with bun and condiments
colspan="2" height="30" Templat:Recipe Infobox Style | Summary
Type Category
Ingredient Category
Technique Category
Diet Category
Origin Category
Time:20 minutes
Difficulty:Easy
colspan="2" height="30" Templat:Recipe Infobox Style | Nutrition
Nutrition Facts[1]
Serving Size 171 Servings in recipe 1
Amount Per Serving
Calories 438 Calories from Fat 180
% Daily Value*
Total Fat 20g 31%
    Saturated Fat 8.2g 41%
    Trans Fat -
    Monounsaturated Fat 9.2g
    Polyunsaturated Fat 2.0g
      Omega-3 180mg
      Omega-6 1709mg
Cholesterol 68mg 23%
Sodium 640mg 3%
Total Carbohydrate 38g 13%
    Dietary Fiber 2g 8%
    Sugars 1g
Protein 27g
Vitamin A 1% Folate 9%
Vitamin B1 18% Vitamin B2 20%
Vitamin B3 40% Vitamin B5 7%
Vitamin B6 13% Vitamin B12 47%
Vitamin C 1% Vitamin D -
Vitamin E 1% Vitamin K 11%
Calcium 15% Copper 9%
Iron 16% Magnesium 10%
Manganese 17% Phosphorus 21%
Potassium 11% Selenium 61%
Sodium 27% Zinc 35%
* Percent Daily Values are based on a 2,000 calorie diet. Your daily values may be higher or lower depending on your calorie needs.
Calories 2,000 2,500
Total Fat Less than 65g 80g
  Sat Fat Less than 20g 25g
Cholesterol Less than 300mg 300mg
Sodium Less than 2,400mg 2,400mg
Total Carbohydrate 300g 375g
  Dietary Fiber 25g 30g
{|{{Infobox Recipe Begin}}
{{Infobox Recipe Image
| Image               = [[File:Hamburger_sandwich.jpg|center|300px|Hamburger sandwich with bun and condiments]]
| Caption             = A hamburger sandwich with bun and condiments
}}
{{Infobox Recipe Summary
|Noincludecat         = yes            | <!-- Don't categorize page, for developing new recipes --
|Reference            = {{Cite nutritiondata |fast-foods-generic/5963/2| Fast foods | accessdate=2011-01-01 |year=2011 }}
|Time                 = 20 minutes     | <!-- ex. "5 minutes" -->
|Rating               = 2              | <!-- number from 1-5 -->
|                                      <!-- categories can go from 1 to 9 -->
|Type1                = Sandwich     | <!-- subcategory of [[:Category:Recipes by type]] -->
|Type2                =              | <!-- subcategory of [[:Category:Recipes by type]] -->
|Ingredient1          = Beef         | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Ingredient2          =              | <!-- subcategory of [[:Category:Recipes by ingredient]] -->
|Technique1           = Barbecue     | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Technique2           =              | <!-- subcategory of [[:Category:Recipes by preparation technique]] -->
|Diet1                = Atkins       | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Diet2                =              | <!-- subcategory of [[:Category:Recipes by diet]] -->
|Origin1              = German       | <!-- subcategory of [[:Category:Recipes by origin]] -->
|Origin2              =              | <!-- subcategory of [[:Category:Recipes by origin]] -->
}}
{{Infobox Recipe Nutrition
|Reference            = {{Cite nutritiondata |fast-foods-generic/5963/2| Fast foods | accessdate=2011-01-01 |year=2011 }}
|ServingSize          = 171
|Servings             = 1
|Calories             = 438
|Protein              = 27
|Carbohydrates        = 38
|  Fiber              = 2
|  Starch             = 
|  Sugars             = 6
|TotalFat             = 20
|  SaturatedFat       = 8.2
|  TransFat           = 
|  MonoFat            = 9.2
|  PolyFat            = 2.0
|    Omega3           = 180   | <!-- in milligrams -->
|    Omega6           = 1709  | <!-- in milligrams -->
|  Cholesterol        = 68    | <!-- in milligrams -->
| <!-- --- Vitamins --- -->
|VitaminA             = 1
|Folate               = 9
|VitaminB1            = 18  | <!-- a.k.a. Thiamine          -->
|VitaminB2            = 20  | <!-- a.k.a. Riboflavin        -->
|VitaminB3            = 40  | <!-- a.k.a. Niacin            -->
|VitaminB5            = 7   | <!-- a.k.a. Panthothenic Acid -->
|VitaminB6            = 13  | <!-- a.k.a. Pyridoxine        -->
|VitaminB12           = 47  | <!-- a.k.a. Cyanocobalamin    -->
|VitaminC             = 1
|VitaminD             = 
|VitaminE             = 1
|VitaminK             = 11
| <!-- --- Minerals --- -->
|Calcium              = 15
|Copper               = 9
|Iron                 = 16
|Magnesium            = 10
|Manganese            = 17
|Phosphorus           = 21
|Potassium            = 11
|Selenium             = 61
|Sodium               = 640 | <!-- in milligrams -->
|Zinc                 = 35
}}
|}

Parameters

[sunting]

Most fields are self-explanatory, but here are some tips:

  1. Image If your article does not have an image in this field, the recipe will automatically be listed at the hidden category Category:Recipes without images. Editors can use the category to easily see a list of infoboxes where no image is attached and work to find pictures.
  2. Caption, the caption for the recipe's picture, should be left blank if no extra information about the picture is available; don't just fill in the recipe's name.

Summary box

[sunting]

Nutrition box

[sunting]
  • Give sodium in milligrams.
  • Other vitamins and minerals are given in percentage of RDA for a 2,000 calorie diet.
  • Other values can be determined by looking at the template: for example, sugars are shown in grams, and this can be read from the template.
  • If a value is given for the Reference parameter, it will be displayed in the references list, for example where the {{Reflist}} template is used in the page. This reference can be reused with <ref name="nutrition"/>

Alternate spellings

[sunting]
  • No support for alternate spellings is currently provided.

Removing extra fields

[sunting]

It's generally a good idea not to remove fields, because another editor might be able to provide the information later. However, in the case of mutually exclusive fields the unused field can be removed if desired. Also, if a section is repeated (to show multiple periods in commission, for example), fields that are inappropriate to duplicate can be removed if desired.

Tricks and tips

[sunting]

Repeating sections

[sunting]

This infobox allows you to repeat sections. To repeat, just make a copy of the section to be repeated. You can repeat the Image, Summary, or Nutrition sections. Here is an example, with extra fields removed for clarity:

colspan="2" Templat:Recipe Infobox Style |
Eärgon chili ready to serve
Eärgon chili ready to serve
Templat:Cookbook other
Eärgon chili ready to serve
colspan="2" height="30" Templat:Recipe Infobox Style | Summary
Type Category
Ingredient Category
Technique Category
Diet Category
Origin Category
Time:5 minutes
Difficulty:EasyTemplat:Cookbook other
Custom field Custom value
colspan="2" Templat:Recipe Infobox Style |
Eärgon chili ingredients
Eärgon chili ingredients
Templat:Cookbook other
Eärgon chili ingredients
{|{{Infobox Recipe Begin}}
{{Infobox Recipe Image
| Image               = [[File:Eargon-chili-finished.jpg|center|300px|Eärgon chili ready to serve]]
| Caption             = Eärgon chili ready to serve
}}
{{Infobox Recipe Summary
|Time                 = 5 minutes
|Rating               = 2
|Type1                = Chili
|Ingredient1          = Tomato
|Technique1           = Pressure cooker
|Diet1                = Vegan
|Origin1              = Tex-Mex
}}
|-
| Custom field
| Custom value
|-
{{Infobox Recipe Image
| Image               = [[File:Eargon-chili-ingred.jpg|center|300px|Eärgon chili ingredients]]
| Caption             = Eärgon chili ingredients
}}
|}

Custom fields

[sunting]

It is possible to add custom fields to the infobox using standard Wiki table syntax. This is not encouraged, because infoboxes are intended to standardize the appearance of recipe articles, but it can be done if needed. See the above example, where "Custom field" and "Custom value" fields are added to the infobox.

See also

[sunting]

Further reading

[sunting]