Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "Template:Monster link"

From DFO World Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{#if: {{#vardefine:icon|{{#show:{{{1|Monster}}}|?Has game icon|link=none|default=File:No_Icon.png}}}} {{#ifexist:{{#var:icon}}||{{#vardefine:icon|File:No_Icon.pn...")
 
(Due to semantic reporting valid pages, we need to check if variables are empty)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<includeonly>{{#if:
 
<includeonly>{{#if:
{{#vardefine:icon|{{#show:{{{1|Monster}}}|?Has game icon|link=none|default=File:No_Icon.png}}}}
+
{{#vardefine:icon|{{#show:{{{1|Monster}}}|?Has icon|link=none|default=File:No_Icon.png}}}}
{{#ifexist:{{#var:icon}}||{{#vardefine:icon|File:No_Icon.png}}}}
 
 
{{#vardefine:name|{{#show:{{{1|Monster}}}|?Has name|default={{{1|Monster}}}}}}}
 
{{#vardefine:name|{{#show:{{{1|Monster}}}|?Has name|default={{{1|Monster}}}}}}}
}}<!--  
+
}}{{#if:{{#var:icon}}|<!--skip-->|{{#vardefine:icon|File:No_Icon.png}}}}{{#if:{{#var:name}}|<!--skip-->|{{#vardefine:name|{{{1|Item}}}}}}}<!-- dfoplayer. Due to semantic reporting valid pages, we need to check if variables are empty --><span style="display:inline-block; {{#if:{{{full size|}}}|width:24px;height:24px;|width:20px;height:20px}}"><!--  
--><span style="display:inline-block; overflow:hidden; vertical-align:middle; {{#if:{{{full size|}}}|width:24px;height:24px;|width:20px;height:20px}}"><!--  
 
 
-->[[{{#if:{{{icon|}}}
 
-->[[{{#if:{{{icon|}}}
 
  | File:{{{icon}}}
 
  | File:{{{icon}}}
 
  | {{#var:icon}} }}|{{#if:{{{full size|}}}|24x24px|20x20px}}|link={{{1|}}}]]</span>&nbsp;<!--  
 
  | {{#var:icon}} }}|{{#if:{{{full size|}}}|24x24px|20x20px}}|link={{{1|}}}]]</span>&nbsp;<!--  
-->{{#if:{{{2|}}}
+
-->[[{{{1}}}|{{#switch:{{lc:{{{class|}}}}}
| [[{{{1}}}|{{{2|}}}]]
+
| champion = <span style="color:#7d01ff;">
| [[{{{1}}}|{{#var:name}}]]
+
| named = <span style="color:#308014;">
}}</includeonly><noinclude>
+
| automated player character | apc = <span style="color:#888888;">
 +
| boss = <span style="color:#ff00ff;">
 +
| ally = <span style="color:#00d1ff;">
 +
}}{{#if:{{{2|}}}
 +
| {{{2|}}}
 +
| {{#var:name}}
 +
}}{{#switch:{{lc:{{{class|}}}}}
 +
| champion | automated player character | apc | named | boss | ally = </span>
 +
}}]]</includeonly><noinclude>
 
== Description ==
 
== Description ==
  
Line 22: Line 28:
 
| icon =  
 
| icon =  
 
| full size =  
 
| full size =  
 +
| class =
 
}}</pre>
 
}}</pre>
  
Line 31: Line 38:
 
; icon : Icon file. Defaults to the icon of the monster.
 
; icon : Icon file. Defaults to the icon of the monster.
 
; full size : Set to anything to display the icon in its original size.
 
; full size : Set to anything to display the icon in its original size.
 +
; class : Colors the link depending on the monster classification. Set to either ''champion'', ''named'', ''apc'', ''ally'', or ''boss''.
  
 
=== Examples ===
 
=== Examples ===

Latest revision as of 19:18, 30 June 2019

Description

This template displays a link to an item with its respective icon.

Usage

{{Monster
|<item page>
|<text>
| icon = 
| full size = 
| class = 
}}

Parameters

All parameters are optional unless stated otherwise.

monster page 
Required. Monster page. The wiki page of the monster.
text 
Displayed text. Defaults to the name of the monster.
icon 
Icon file. Defaults to the icon of the monster.
full size 
Set to anything to display the icon in its original size.
class 
Colors the link depending on the monster classification. Set to either champion, named, apc, ally, or boss.

Examples

{{Monster link|Nilvas Gracia}}

No Icon.png Nilvas Gracia

{{Monster link|Nilvas Gracia|Edgy Demon|full size = y}}

No Icon.png Edgy Demon