User:Leonim/Template:Icon

From Guild Wars 2 Wiki
Jump to navigationJump to search

Description[edit]

This template constructs a framed icon with characteristics dependent upon the parameters.

Inner mechanics[edit]

Here's how this works: if you're lucky, the name of an in-game aspect will have identical names with its article and its corresponding file's name.

In this case, you would just need to provide the parameter i as the name of this in-game aspect and optionally, a size : either by format with the parameter s or in p pixels. In the worst case scenario, parameters f and l override the default image and link. If, however, you don't want to link to an article, provide f instead of i.

Thanks[edit]

  • User:Shewmake for the initial design of the Template/Icon, upon which I only added the highlight mechanic and some tailoring to my personal uses.

Usage[edit]

{{User:Leonim/Template:Icon
| i = 
| f = 
| e = 
| s = 
| p = 
| a = 
| l = 
| t = 
}}

Parameters[edit]

i
Advised. Icon name. Defaults to skill with regard to image or defaults to nothing if l (link) is provided.
f
Optional. File name. Overrides or defaults to i (icon name).
e
Optional. File extension. Defaults to "png".
s
Optional. Icon size format (options: "small", "med" or "large"). Defaults to "small".
p
Optional. Icon size in pixels. Overrides s (icon size format).
a
Customization. Border definition and activability awareness.
Highlights the icon (high-contrast borders) if set to "true".
Hides the borders if set to "none".
Defaults to "false" : "rugged" borders.
Any other value would change the border style.
l
Optional. Wiki link. Defaults to i (icon name).
t
Optional. Title mouseover. Defaults to i (icon name) when overriden by a link.

Examples[edit]

Custom-sized icon[edit]

Icon (24px width size) of the Royal Ascalonian Axe.png image that links to the Axe article.

{{User:Leonim/Template:Icon|i=Royal Ascalonian Axe|e=png|p=24|l=Axe}}
User Shewmake icon-border-s.png
 
Royal Ascalonian Axe

Large icon with highlight[edit]

Large highlighted icon of the Biography Subterfuge.png file with a lengthy mouseover description but no provided link.

{{User:Leonim/Template:Icon
| f = Biography Subterfuge
| e = png
| s = large
| a = true
| t = With a well placed word or the flourish of my cape, I turn your attention where I want it. I am the master of misdirection and intrigue.
}}
 
Biography Subterfuge.png

Code[edit]

Preview[edit]

User Shewmake icon-border-s.png
 
Skill.png

See also[edit]