Template:Tile/doc
Creates a tile with an image and caption that is resizable. Intended as a replacement for galleries with improved custom sizing and style.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Image | 1 image | no description
| File | required |
Caption | 2 caption | Text to accompany the image. Don't place any links inside this field.
| String | suggested |
Link | 3 link | The name of the page that the image and caption should link to.
| Page name | optional |
Width | 4 width w | The width of the tile's image (in pixels).
| Number | optional |
Height | 5 height h | The height of the tile's image (in pixels).
| Number | optional |
Crop | crop | Determines the position of the image when cropped to fit into its specified size. Intended for when the image has been automatically cropped into an undesired position.
| String | optional |
Float | float | Used for positioning/aligning the tile on the page, allowing text to wrap around it.
| String | optional |
CSS | css | An additional parameter to add any CSS to customise the individual tile.
| String | optional |
Syntax
{{Tile|image|caption|link|width|height}}
{{Tile|image|caption|link|w=|h=}}
{{Tile|image=|caption=|link=|width=|height=}}
While all syntax's can be used, it's advised to use a combination of the the three, such as:
{{Tile|image|caption|link=|w=|h=}}
This is the most similar to a regular image syntax: [[Image:Image.png|Caption here|link=Link here]]
The first of the three syntax's can cause confusion, for example, when you want to specify only the height of the tile but don't want to add a link or change the width, it must be written like this:
{{Tile|image|caption|||height}}
This version of the syntax relies on the parameter's position within the template to be parsed, so the first parameter is counted as the image, second as caption, third as link and so on. This means when you don't need to include one of the parameters but need one that is counted after it, you still need to include the pipe symbol (|
) as if it was there, causing confusion of which parameter is which. That's why for any parameter that isn't the image or caption, you should use a combination. Named parameters (e.g. width=
, image=
) do not need to be in a certain position within the template, making it far easier to work with.
Examples
{{Tile|Countess.png|Countess|Countess}}
Countess |
Centered Tiles
To create a collection of centered tiles, similar to a gallery, you can wrap the tile templates in the <center> tag.
<center> {{Tile|Countess.png|Countess|Countess}} {{Tile|Countess.png|Countess|Countess}} {{Tile|Countess.png|Countess|Countess}} {{Tile|Countess.png|Countess|Countess}} </center>
Crop Position
If the automatic crop of a tile's image is in an undesired position, you can manually set its position through 4 values: top, bottom, left and right.
<center> {{Tile|Countess.png|Center||50|150}} {{Tile|Countess.png|Left||50|150|crop=left}} {{Tile|Countess.png|Right||50|150|crop=right}} {{Tile|Countess.png|Center||200|100}} {{Tile|Countess.png|Bottom||200|100|crop=bottom}} {{Tile|Countess.png|Top||200|100|crop=top}} </center>
Center |
Left |
Right |
Center |
Bottom |
Top |
Float Alignment
Like a thumbnail image, you can align the tile to be on the left or right of the page. This will allow any text to wrap around the tile.
{{Tile|Countess.png|Countess|Countess|float=left}} {{Tile|Countess.png|Countess|Countess|float=right}}
Countess |
Countess |