Template:Ingredient: Difference between revisions
Appearance
Recipedius seed |
0.010 T016: deploy 0.009 recipe and ingredient contract, 0.007 techniques, and template sandboxes (dbbad33) |
||
| Line 17: | Line 17: | ||
}} | }} | ||
== Ingredient record == | == Ingredient record == | ||
One page per ingredient. The infobox is the record; recipes link to it and the [[Module:Recipedius|computed layer]] reads it for calories, allergens and substitutions. | One page per ingredient. Its page title is its Name. The infobox is the record; | ||
recipes link to it and the [[Module:Recipedius|computed layer]] reads it for | |||
calories, allergens and substitutions. | |||
<pre> | <pre> | ||
| Line 30: | Line 32: | ||
|pantry=no | |pantry=no | ||
|price=4.49 |price_per=1 lb | |price=4.49 |price_per=1 lb | ||
| | |description=A paragraph or two about what this ingredient does in a kitchen and what can stand in for it. | ||
}} | }} | ||
</pre> | </pre> | ||
<code>description</code> is the preferred name for the visible description. | |||
The existing <code>summary</code> name remains supported for existing pages and | |||
forms. When both are supplied, <code>description</code> wins. | |||
Then add substitution rules in a table using [[Template:Substitution]]. Grams per unit and kcal per 100 g drive every calculation; enter them from a source you trust and cite it in the summary. | Then add substitution rules in a table using [[Template:Substitution]]. Grams per unit and kcal per 100 g drive every calculation; enter them from a source you trust and cite it in the summary. | ||
Test any change at [[Template:Ingredient/testcases]] through [[Template:Ingredient/sandbox]] before deploying it. | |||
[[Category:Recipedius templates]] | [[Category:Recipedius templates]] | ||
</noinclude><includeonly>{{#cargo_store:_table=Ingredients | </noinclude><includeonly>{{#cargo_store:_table=Ingredients | ||
| Line 49: | Line 55: | ||
|price={{{price|}}} | |price={{{price|}}} | ||
|price_per={{{price_per|}}} | |price_per={{{price_per|}}} | ||
|summary={{{summary|}}} | |summary={{#if:{{{description|}}}|{{{description}}}|{{{summary|}}}}} | ||
}}{| class="wikitable rp-infobox" | }}{| class="wikitable rp-infobox" | ||
|+ {{PAGENAME}} | |+ {{PAGENAME}} | ||
| Line 97: | Line 103: | ||
| colspan="2" | <small>Approximate; enter values from a source you trust.</small> | | colspan="2" | <small>Approximate; enter values from a source you trust.</small> | ||
|} | |} | ||
{{{summary|}}} | |||
== Description == | |||
{{#if:{{{description|}}}|{{{description}}}|{{#if:{{{summary|}}}|{{{summary}}}|''No description yet.''}}}} | |||
== Find out more == | |||
* [https://en.wikipedia.org/w/index.php?search={{urlencode:{{PAGENAME}}}} Search Wikipedia for {{PAGENAME}}] | |||
* [https://fdc.nal.usda.gov/food-search?query={{urlencode:{{PAGENAME}}}} Search USDA FoodData Central for {{PAGENAME}}] | |||
== Used in == | == Used in == | ||
Revision as of 19:25, 23 September 2026
This template defines the table "Ingredients". View table.
Ingredient record
One page per ingredient. Its page title is its Name. The infobox is the record; recipes link to it and the computed layer reads it for calories, allergens and substitutions.
{{Ingredient
|form=Unsalted, solid
|role=Fat · structure, flavor, creaming
|storage=Fridge, 1–3 months
|season=Year-round
|kcal100=717
|g_tsp=4.7 |g_tbsp=14.2 |g_cup=227 |g_each=
|allergens=dairy
|pantry=no
|price=4.49 |price_per=1 lb
|description=A paragraph or two about what this ingredient does in a kitchen and what can stand in for it.
}}
description is the preferred name for the visible description.
The existing summary name remains supported for existing pages and
forms. When both are supplied, description wins.
Then add substitution rules in a table using Template:Substitution. Grams per unit and kcal per 100 g drive every calculation; enter them from a source you trust and cite it in the summary.
Test any change at Template:Ingredient/testcases through Template:Ingredient/sandbox before deploying it.