Difference between revisions of "Template:RenderIngredient"

From DDO Compendium
Line 24: Line 24:


{{#switch: {{lc:{{#dplvar:renderstyle}}}}
{{#switch: {{lc:{{#dplvar:renderstyle}}}}
|icononly={{#dplvar:ingcount}}x [[File:{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}_Icon.png|link={{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}|{{{3|}}}|36px|x36px|{{{1}}}]] 
|icononly=[[File:{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}_Icon.png|link={{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}|{{{3|}}}|36px|x36px|{{{1}}}]]
|icononly2={{#dplvar:ingcount}}x [[File:{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}_Icon.png|link={{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}|{{{3|}}}|36px|x36px|{{{1}}}]] 
|testing={{#ifexist: File:{{#if: {{{2|}}}|{{{2|}}}|{{{1}}}}}_Icon.png|
|testing={{#ifexist: File:{{#if: {{{2|}}}|{{{2|}}}|{{{1}}}}}_Icon.png|
<div style="position: relative; background: url({{#dplvar:filepath}}); width: 36px; height: 36px;">
<div style="position: relative; background: url({{#dplvar:filepath}}); width: 36px; height: 36px;">

Revision as of 19:35, 18 October 2021

RenderIngredient[edit]

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

Example Usage
{{RenderIngredient|Silver Flame Trinket}}* oajdflasdf
  • alsdfj
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
{{Ingredient|Thread of Fate|250}}Thread of Fate

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.


[[File:{{{1}}}_Icon.png|link={{{1}}}||36px|x36px|{{{1}}}]]