Difference between revisions of "Template:RenderIngredient"

From DDO Compendium
(Created page with "<noinclude>{{Template:TemplateDocumentation |name = RenderIngredient |description = Template for a consistent appearance of ingredients in recipes, used by the main templates....")
 
Line 5: Line 5:
|usesnamedparameters = no
|usesnamedparameters = no
|example1 = <nowiki>{{RenderIngredient|Silver Flame Trinket}}</nowiki>
|example1 = <nowiki>{{RenderIngredient|Silver Flame Trinket}}</nowiki>
|example1output = {{Ingredient2|Silver Flame Trinket}}
|example1output = {{#dplvar:set|ingcount|5}}{{RenderIngredient|Silver Flame Trinket}}
|example2 = <nowiki>{{Ingredient2|Dark Scarab Powder|5}}</nowiki><br>Has no Icon in database
|example2 = <nowiki>{{RenderIngredient|Dark Scarab Powder|Ingredient Scarab}}</nowiki><br>Has no Icon in database
|example2output = {{Ingredient2|Dark Scarab Powder|5}}
|example2output = {{RenderIngredient|Dark Scarab Powder|Ingredient Scarab}}
|example3 = <nowiki>{{Ingredient2|Dark Scarab Powder|5}</nowiki>
|example3 = <nowiki>{{RenderIngredient|Lily Petal|Lily Petal (Collectable)|Lily Petal (Collectable)}}</nowiki>
|example3output = {{Ingredient2|Dark Scarab Powder|5}}
|example3output = {{RenderIngredient|Lily Petal|Lily Petal|Lily Petal (Collectable)}}
|example4 = <nowiki>{{Ingredient2|Thread of Fate|250}}</nowiki>
|example4 = <nowiki>{{Ingredient2|Thread of Fate|250}}</nowiki>
|example4output = {{Ingredient2|Thread of Fate|250}}
|example4output = {{#dplvar:set|ingcount|250}}{{Ingredient2|Thread of Fate|250}}
|parameter1name = title
|parameter1name = title
|parameter1description = The Ingredient title
|parameter1description = The Ingredient title
Line 18: Line 18:
|parameter3name = page
|parameter3name = page
|parameter3description = The page name, if not the same as the title.
|parameter3description = The page name, if not the same as the title.
}}</noinclude><onlyinclude>{{IconImage|{{{1}}}|{{{2|}}}|{{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}}} {{#dplvar:ingcount}}x {{PageLink|{{{1}}}|{{{3|}}}</onlyinclude>
}}</noinclude><onlyinclude>
{{#ifexist: File:{{#if: {{{2|}}}|{{{2|}}}|{{{1}}}}}_Icon.png|[[File:{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}_Icon.png|link={{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}|36px|x36px|]]}} {{#dplvar:ingcount}}x {{PageLink|{{{1}}}|{{{3|}}}}}</onlyinclude>

Revision as of 13:22, 16 October 2021

RenderIngredient[edit]

Template for a consistent appearance of ingredients in recipes, used by the main templates.

Example Usage
{{RenderIngredient|Silver Flame Trinket}}5x Silver Flame Trinket
{{RenderIngredient|Dark Scarab Powder|Ingredient Scarab}}
Has no Icon in database
Ingredient Scarab Icon.png 5x Dark Scarab Powder
{{RenderIngredient|Lily Petal|Lily Petal (Collectable)|Lily Petal (Collectable)}}5x Lily Petal
{{Ingredient2|Thread of Fate|250}}Template:Ingredient2

Usage[edit]

Parameter Documentation
titleThe Ingredient title
IconName of the icon, if not the same as the title
pageThe page name, if not the same as the title.

Template

Ignore any errors below this line, The errors occur because there is no input into the template, in the template itself.


250x [[{{{1}}}]]