Template:Tile

From Red Faction Wiki
Revision as of 16:08, 28 January 2024 by SimpleArrows (talk | contribs) (Created page with "<includeonly>{| class="tile" |style="width:{{{4|128}}}px; height:{{{5|128}}}px;"|[[Image:{{{1}}} {{#if:{{{3|}}}| link={{{3}}} }}]] |- |{{#if: {{{2|}}} | {{{2}}} | ''' '''}} |}</includeonly> <noinclude> <templatedata> { "params": { "1": { "label": "Image", "example": "Icon_RFG.png", "type": "wiki-file-name", "required": true }, "2": { "label": "Caption", "description": "Text or a link to accompany the image.", "example": "Alec Mason", "type"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Creates a tile with an image and caption that is resizable. Intended as a replacement for galleries with improved custom sizing and style.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Image1

no description

Example
Icon_RFG.png
Filerequired
Caption2

Text or a link to accompany the image.

Example
Alec Mason
Stringsuggested
Link3

The name of the page that the image should link to. The page you use should be the same as linked in the caption.

Example
Red Faction: Guerrilla
Page nameoptional
Width4

The width of the tile's image (in pixels).

Default
128
Example
50
Numberoptional
Height5

The height of the tile's image (in pixels).

Default
128
Example
150
Numberoptional
{{Tile|IMAGE|CAPTION|LINK|WIDTH|HEIGHT}}

Usage:

{{Tile|Min_ATV.png|Mining ATV||250|150}}

Output:

Min ATV.png
Mining ATV




Centered Tiles:

To create a collection of centered tiles, similar to a gallery, you can use a table with a "center" class:

{| class="center"
| 
|}

Usage:

{| class="center"
|{{Tile|Min_ATV.png|Mining ATV||150|100}}
{{Tile|Min_ATV.png|Mining ATV||150|100}}
{{Tile|Min_ATV.png|Mining ATV||150|100}}
{{Tile|Min_ATV.png|Mining ATV||150|100}}
|}

Output:

Min ATV.png
Mining ATV
Min ATV.png
Mining ATV
Min ATV.png
Mining ATV
Min ATV.png
Mining ATV