Difference between revisions of "Template:FileCaption/doc"
Jump to navigation
Jump to search
| Line 2: | Line 2: | ||
Used to provide images with captions as an alternative to the ugly ones with a frame that come with MediaWiki. | Used to provide images with captions as an alternative to the ugly ones with a frame that come with MediaWiki. | ||
| − | ToDo: Rename to " | + | ToDo: Rename to "FileCaption" to imply this template is used with "File:..." syntax. |
=== Usage === | === Usage === | ||
| − | * <code>file=</code> Sets which file to use. Default value is | + | * <code>file=</code> Sets which file to use. Default value is Dept-for-BEIS-RWM.svg. |
* <code>width=</code> width of the image. | * <code>width=</code> width of the image. | ||
* <code>height=</code> height of the image | * <code>height=</code> height of the image | ||
| Line 12: | Line 12: | ||
* <code>padding=</code> Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; turn off by setting parameter to "no". | * <code>padding=</code> Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; turn off by setting parameter to "no". | ||
<pre> | <pre> | ||
| − | {{ | + | {{FileCaption |
|file - the filename of the image | |file - the filename of the image | ||
|50 - width | |50 - width | ||
| Line 20: | Line 20: | ||
=== Example === | === Example === | ||
| − | <pre>{{Img Title| | + | <pre>{{Img Title|Dept-for-BEIS-RWM.svg|180|37}}</pre> |
Gives the image at the top right of this page. | Gives the image at the top right of this page. | ||
| − | {{Img Title|file= | + | {{Img Title|file=Dept-for-BEIS-RWM.svg|width=180|height=37|padding=no|caption=This is a caption.}} |
| − | |||
<includeonly>[[Category:WikiPolitiks templates]]</includeonly> | <includeonly>[[Category:WikiPolitiks templates]]</includeonly> | ||
Revision as of 22:04, 20 December 2019
Experimenting with a template found on MediaWiki.
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 imply this template is used with "File:..." syntax.
Usage
file=Sets which file to use. Default value is Dept-for-BEIS-RWM.svg.width=width of the image.height=height of the imagealign=Sets alignment of image and caption block. Options are right, left, center, and none. Default is right.caption=Places a caption beneath the image, and also serves as the alt text. 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; turn off by setting parameter to "no".
{{FileCaption
|file - the filename of the image
|50 - width
|50 - height
}}
Example
{{Img Title|Dept-for-BEIS-RWM.svg|180|37}}
Gives the image at the top right of this page. Template:Img Title