Template:FileCaption/doc

From WikiCorporates
Jump to navigation Jump to search

Experimenting with a template found on MediaWiki, which looks very similar to MediaWiki's own version. MediaWiki started something similar in 2014, but ditched it due to problems with videos. See Thumbnail style update.
Used to provide images with captions as an alternative to the ugly ones with a frame that come with MediaWiki.

ToDo: Rename to "FileCaption" to denote this template is used with "File:..." syntax.

Usage

  • file= Sets which file to use. Default value is Dept-for-BEIS-RWM.svg.
  • sz= width x height of the image.
  • align= Sets alignment of the caption only. Options are right, left, centre, and none. Default is centre.
  • caption= Places a caption beneath the image. Optional.
  • padding= Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; default set to 0.5em;; turn off by setting parameter to "no".
{{FileCaption
|file  - the filename of the image
|50              - width
|50              - height
}}
#808080 = 128,128,128 = gray
#bebebe = 190,190,190
#a0a0a0

Example

{{Img Title|Dept-for-BEIS-RWM.svg|180|37}}

Gives:

Template:Img Title

BBC Guide to UK Nuclear Power