Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Ingredient: Difference between revisions

Template page
(I love ifs)
No edit summary
Line 1: Line 1:
{{#if:{{{2|}}}|{{#ifeq:{{{2|}}}|nolink|[[File:{{{1}}}.png]]{{{1}}}|{{#ifeq:{{{3|}}}|nolink|[[File:{{{2}}}]]{{{1}}}|[[File:{{{2}}}|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]}}|[[File:{{{1}}}.png|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]}}|[[File:{{{1}}}.png|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]}}<noinclude>
{{#ifeq:{{{action|}}}|grind|[[File:Grinder.png]] Grind<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|butcher|[[File:Butcher's_Cleaver.png]] Butcher<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|juice|[[File:Grinder.png]] Juice<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|cut|[[File:Kitchen knife.png]] Cut<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|slice|[[File:Kitchen knife.png]] Slice<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|harvest|[[File:Scythe.png]] Harvest<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|milk|[[File:Bucket.png]] Milk<span class="nowrap">&nbsp;</span> |
{{#ifeq:{{{action|}}}|roll|[[File:RollingPin.png]] Use your rolling pin on<span class="nowrap">&nbsp;</span> |}}}}}}}}}}}}}}}}{{#if:{{{2|}}}|{{#ifeq:{{{2|}}}|nolink|[[File:{{{1}}}.png]]{{{1}}}|{{#ifeq:{{{3|}}}|nolink|[[File:{{{2}}}]]{{{1}}}|[[File:{{{2}}}|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]}}|[[File:{{{1}}}.png|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]}}|[[File:{{{1}}}.png|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]}}<noinclude>
== How to use ==
== How to use ==
Meant to be used alongside the [[Template:CookingRecipe]] template. This is purely to quickly create a link to an anchor and have pretty picture.
Meant to be used alongside the [[Template:CookingRecipe]] template. This is purely to quickly create a link to an anchor and have pretty picture.
Line 13: Line 20:
* '''image''': Optional. The image you want to use, will use the name if not specified. Requires a file extension.
* '''image''': Optional. The image you want to use, will use the name if not specified. Requires a file extension.
* '''nolink''': Removes the automatic link to anchor with same name.
* '''nolink''': Removes the automatic link to anchor with same name.
* '''action'''': For actions to precede the recipe or a specific ingredient. Includes the following: grind, butcher, juice, cut, slice, harvest, milk, roll


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 19:41, 25 October 2023

[[File:{{{1}}}.png|link=#{{{1}}}]][[#{{{1}}}|{{{1}}}]]

How to use

Meant to be used alongside the Template:CookingRecipe template. This is purely to quickly create a link to an anchor and have pretty picture.

{{Ingredient|name|(image or nolink)|(nolink only if image)}}

Meaning

Self explanatory, with some special arguments.

  • name: The name of the ingredient.
  • image: Optional. The image you want to use, will use the name if not specified. Requires a file extension.
  • nolink: Removes the automatic link to anchor with same name.
  • action': For actions to precede the recipe or a specific ingredient. Includes the following: grind, butcher, juice, cut, slice, harvest, milk, roll