Difference between revisions of "Template:RenderIngredient"
From DDO Compendium
MNDeveloper (talk | contribs) (Created page with "<noinclude>{{Template:TemplateDocumentation |name = RenderIngredient |description = Template for a consistent appearance of ingredients in recipes, used by the main templates....") |
MNDeveloper (talk | contribs) |
||
Line 5: | Line 5: | ||
|usesnamedparameters = no | |usesnamedparameters = no | ||
|example1 = <nowiki>{{RenderIngredient|Silver Flame Trinket}}</nowiki> | |example1 = <nowiki>{{RenderIngredient|Silver Flame Trinket}}</nowiki> | ||
|example1output = {{ | |example1output = {{#dplvar:set|ingcount|5}}{{RenderIngredient|Silver Flame Trinket}} | ||
|example2 = <nowiki>{{ | |example2 = <nowiki>{{RenderIngredient|Dark Scarab Powder|Ingredient Scarab}}</nowiki><br>Has no Icon in database | ||
|example2output = {{ | |example2output = {{RenderIngredient|Dark Scarab Powder|Ingredient Scarab}} | ||
|example3 = <nowiki>{{ | |example3 = <nowiki>{{RenderIngredient|Lily Petal|Lily Petal (Collectable)|Lily Petal (Collectable)}}</nowiki> | ||
|example3output = {{ | |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>{{ | }}</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 | ![]() |
{{RenderIngredient|Lily Petal|Lily Petal (Collectable)|Lily Petal (Collectable)}} | 5x Lily Petal |
{{Ingredient2|Thread of Fate|250}} | Template:Ingredient2 |
Usage[edit]
Parameter Documentation | |
title | The Ingredient title |
Icon | Name of the icon, if not the same as the title |
page | The 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}}}]]