Template:Game update icon

From Guild Wars 2 Wiki
Jump to navigationJump to search

Description[edit]

A template that provides skill and trait icons for game update pages. Furthermore, allows to set game update "note" which then can be substituted by {{Game update helper}}. Format template: {{Game update icon result format}}.

Usage[edit]

{{Game update icon|<page name>}}

Parameters[edit]

1 (unnamed parameter)
skill or trait page name.
2 (unnamed parameter)
Optional. Displayed skill or trait name. This one may differ from the page name, for example upper-/lowercase mistakes in the game update notes.
icon
Optional. Specify a valid filename without the "File:" prefix.
note
Optional. Displays the game update note and creates a subobject which sets the properties Has game update context page=Game updates/<date>, Has game update page=<skill or trait page>, and Has game update note={{{note|}}}. Requires the SUBPAGENAME to contain 202X.

Example[edit]

* {{Game update icon|Retribution (trait)}}
* {{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}}
  • Retribution (trait).png
     Retribution: This trait no longer grants bonus ferocity.

Notes[edit]

// Scripts to use when viewing game updates
if (mw.config.get('wgPageName').substring(0, 12) == 'Game_updates') {
    $('li .skillicon, li .effecticon, li .traiticon').each(function(){
      $(this).parent('li').addClass('patchnote');
    });
}
.patchnote { line-height: 2.7em; }
.patchnote .skillicon img, .patchnote .traiticon img { background-color: black; }