Difference between revisions of "Template:Ingredient"

From DDO Compendium
Line 4: Line 4:
|category = Shared Templates
|category = Shared Templates
|usesnamedparameters = no
|usesnamedparameters = no
|example1 = <nowiki>{{Ingredient|Silver Flame Trinket}}</nowiki>
|example1 = <nowiki>{{Ingredient2|Silver Flame Trinket}}</nowiki>
|example1output = {{Ingredient|Silver Flame Trinket}}
|example1output = {{Ingredient2|Silver Flame Trinket}}
|example2 = <nowiki>{{Ingredient|Dark Scarab Powder|5}}</nowiki><br>Has no Icon in database
|example2 = <nowiki>{{Ingredient2|Dark Scarab Powder|5}}</nowiki><br>Has no Icon in database
|example2output = {{Ingredient|Dark Scarab Powder|5}}
|example2output = {{Ingredient2|Dark Scarab Powder|5}}
|example3 = <nowiki>{{Ingredient|Dark Scarab Powder|5|Ingredient Scarab}}</nowiki>
|example3 = <nowiki>{{Ingredient2|Lily Petal (Collectable)|5}</nowiki>
|example3output = {{Ingredient|Dark Scarab Powder|5|Ingredient Scarab}}
|example3output = {{Ingredient2|Lily Petal (Collectable)|5}}
|example4 = <nowiki>{{Ingredient|Threads of Fate|250||Thread of Fate}}</nowiki>
|example4 = <nowiki>{{Ingredient2|Thread of Fate|250}}</nowiki>
|example4output = {{Ingredient|Threads of Fate|250||Thread of Fate}}
|example4output = {{Ingredient2|Thread of Fate|250}}
|parameter1name = Ingredient Name
|parameter1name = page name
|parameter1description =  
|parameter1description = The Ingredient page
|parameter2name = Number of Ingredients required
|parameter2name = Count
|parameter2description =
|parameter2description = Number of Ingredients required
|parameter2values = Any Integer (Defaults to 1)
|parameter2values = Any Integer (Defaults to 1)
|parameter3name = Icon (If any)
}}</noinclude><onlyinclude>{{#dplvar:set|rendertype|ingredient|ingcount|{{{2|1}}}}}{{:{{{1}}}}}</onlyinclude>
|parameter3description =
|parameter3values =
* None (No icon)
* Forced (requires icon, will display red link if nonexistent, useful to easily upload icons)
* <Icon Name> (Redact .png)
* Blank (defaults to using a standard icon naming format)
|parameter4name = Page Name
|parameter4description = The name of the page to link to if different than the ingredient name
}}</noinclude><onlyinclude>{{#switch: {{lc:{{#dplvar:ingredientformat}}}}
|icononly={{#if: {{{2|}}} | {{{2|}}} | 1 }}x{{#ifexist: File:{{#if: {{{3|}}}|{{{3|}}}|{{#if: {{{4|}}}|{{{4|}}}|{{{1}}}}}}}_Icon.png | {{IconImage|{{#if: {{{4|}}}|{{{4|}}}|{{{1}}}}}|{{{3|}}}|{{#if: {{{4|}}}|{{{4|}}}|{{{1}}}}}}}}}
|#default={{#switch: {{lc:{{{3|}}}}}
| none = 
| force = {{IconImage|{{{1}}}|{{{1|}}}|{{{1|}}}}}
| #default={{#ifexist: File:{{#if: {{{3|}}}|{{{3|}}}|{{#if: {{{4|}}}|{{{4|}}}|{{{1}}}}}}}_Icon.png | {{IconImage|{{#if: {{{4|}}}|{{{4|}}}|{{{1}}}}}|{{{3|}}}|{{#if: {{{4|}}}|{{{4|}}}|{{{1}}}}}}} | }}}} {{#if: {{{2|}}} | {{{2|}}} | 1 }}x {{PageLink|{{{1|}}}|{{{4|}}}}}}}</onlyinclude>

Revision as of 13:35, 16 October 2021

Ingredient[edit]

Template for a consistent appearance of ingredients in recipes.

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

Usage[edit]

Parameter Documentation
page nameThe Ingredient page
CountNumber of Ingredients required
Possible Values: Any Integer (Defaults to 1)

Template

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


{{:{{{1}}}}}