STO Awakening.jpg


From Star Trek Online Wiki
Jump to: navigation, search

This template can be used as a wrapper around various icons.

{{IconWrapper|Engineering Officer Candidate icon (Romulan)|36px|Engineering Officer Candidate}}

creates: Engineering Officer Candidate icon (Romulan).png

Parameters[edit source]

  1. Name of the icon (without the ".png" suffix) (optional). This is used to determine the filename of the icon. A "No Icon" image is substituted if this is missing or the file does not exist.
  2. Icon size (optional). If nothing is entered the full size is assumed.
  3. Page to link to (optional). The name of the article that the icon should link to, or no link if omitted.

Why is this useful?[edit source]

This template is intended to be called by other templates which construct a complex icon file name from their parameters. Since templates output the result of their processing as they go, it is difficult to construct a complex file name, and then also check to see if that file exists before rendering it. Using this template, a calling template can construct a complex file name and simply pass it to this template as a single parameter, allowing the existence of the file to be checked easily, rending an alternative icon if the file does not exist.

Other Examples[edit source]

A: {{IconWrapper|Tactical Officer Candidate icon (Federation)|36px|Tactical Officer Candidate}}
B: {{IconWrapper|Science Officer Candidate icon (Klingon)|24px|Science Officer Candidate}}
C: {{IconWrapper|Icon does not exist|36px|Engineering Officer Candidate}}
D: {{IconWrapper}}

A: Tactical Officer Candidate icon (Federation).png B: Science Officer Candidate icon (Klingon).png C: No icon.png D: No icon.png