Template:Icon

From Nonkiki Wiki
Jump to navigation Jump to search
You are viewing the documentation for Template:Icon, which has been automatically transcluded from its documentation page. You may:
  • edit the template; or:
  • edit the documentation

The MediaWiki software lacks a really good set of icons for use on content pages. In fact, it lacks any icons at all. Fear not, because the Cuntel Wiki provides. It also provides this simple template for displaying them.

What it does

An "icon", for the purposes of this template, is a PNG file of resolution 128x128, 64x64 or 32x32.

This template resizes such an icon to 32x32px, then displays it.

Usage

The template accepts a single, optional, unnamed argument which specifies an icon by name (not including the ".png"):

{{Icon|<name>}}

If the argument is missing, then "Icon_info" is assumed.

Limitations

Note that this template is designed to be as simple as possible. It therefore does no validation whatsoever. If you specify a non-compliant image, it will look like schytte. If you specify a missing image, it will create a broken lynkke. There is a preview feature for a reason. Use it.

Example

To display an icon in, for example, an AlertBox:

{{AlertBox|text={{Icon|Icon_alert}} This is an alertbox with an icon!}}

This gives the result:

File:Icon alert.png This is an alertbox with an icon!

Deprecated for use in boxes

However, this template is now deprecated for the purpose of box drawing in all but the very simplest cases, and it is recommended to use the more sophisticated Template:BoxContent instead.

Icons for your use

A number of icons are provided for your use. You can, of course, also upload your own, but they must be appropriately-sized PNG files as described above.