Difference between revisions of "Template:Ingredient"

From DDO Compendium
Line 26: Line 26:
|parameter4name = Page Name
|parameter4name = Page Name
|parameter4description = The name of the page to link to if different than the ingredient name
|parameter4description = The name of the page to link to if different than the ingredient name
}}</noinclude><onlyinclude>{{#switch: {{lc:{{{3|}}}}}  
}}</noinclude><onlyinclude>{{#switch: {{lc:{{#dplvar:ingredientformat}}}}
|icononly={{#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 =   
| none =   
| force = {{IconImage|{{{1}}}|{{{1|}}}|{{{1|}}}}}
| 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>
| #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 20:19, 15 October 2021

Ingredient[edit]

Template for a consistent appearance of ingredients in recipes.

Example Usage
{{Ingredient|Silver Flame Trinket}}1x Silver Flame Trinket
{{Ingredient|Dark Scarab Powder|5}}
Has no Icon in database
5x Dark Scarab Powder
{{Ingredient|Dark Scarab Powder|5|Ingredient Scarab}}Ingredient Scarab Icon.png 5x Dark Scarab Powder
{{Ingredient|Threads of Fate|250||Thread of Fate}}Thread of Fate Icon.png 250x Threads of Fate

Usage[edit]

Parameter Documentation
Ingredient Name
Number of Ingredients required
Possible Values: Any Integer (Defaults to 1)
Icon (If any)
Possible Values:
  • 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)
Page NameThe name of the page to link to if different than the ingredient name

Template

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


1x [[]]