Difference between revisions of "Template:RenderIngredient"
From DDO Compendium
MNDeveloper (talk | contribs) |
MNDeveloper (talk | contribs) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
{{#switch: {{lc:{{#dplvar:renderstyle}}}} | {{#switch: {{lc:{{#dplvar:renderstyle}}}} | ||
|icononly= | |icononly=<div style="display:inline-block;position:relative">[[File:{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}_Icon.png|link={{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}|{{{3|}}}|36px|x36px|{{#dplvar:ingcount}}x {{{1}}}]]<div style="font-size:12px;text-shadow:-1px -1px 0 #000000,1px -1px 0 #000000,-1px 1px 0 #000000,1px 1px 0 #000000;position:absolute;z-index:2;right:2px;bottom:0;width:100%;pointer-events:none;text-align:right;">{{#dplvar:ingcount}}</div></div> | ||
<div style=" | |||
|#default={{#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> | |#default={{#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> |
Latest revision as of 20:31, 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
|
{{RenderIngredient|Dark Scarab Powder|Ingredient Scarab}} Has no Icon in database | 5x Dark Scarab Powder |
{{RenderIngredient|Lily Petal|Lily Petal (Collectable)|Lily Petal (Collectable)}} | 5x Lily Petal |
{{Ingredient|Thread of Fate|250}} |
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.
[[File:{{{1}}}_Icon.png|link={{{1}}}||36px|x36px|x {{{1}}}]]