November 4th, 2019

🕒 Wiki Weekly #25! 🕑

It's November!
We've listed pages that need some love. Take a look!

Latest Announcements

Template:Image

From Zelda Wiki, the Zelda encyclopedia
Jump to: navigation, search


Purpose

This is a dynamic template that offers enhanced ways of handling images, including ways to:

  • Create captions for transparent images
  • Create tooltips for images with frames

Neither of these options are available or practical with standard image coding. This template allows for simplified ways of performing complex formatting of images.

Usage

To use this template, start with this code:

{{Image
|image        = 
|type         = 
|size         = 
|align        = 
|caption      = 
|captionalign = 
|title        = 
|alt          = 
|link         = 
}}

Here are descriptions of the parameters. Only the parameter "image" is actually required, the rest are optional.

  • image — The desired image. Do not include a File prefix.
  • type — The type of display for the image. Choices are frameless, thumb, and caption. It defaults to caption if left blank. Frameless displays the image without any boxes or captions. Thumb displays the image in the traditional thumbnail box. Caption displays the image without any frame but with a boxed caption below it.
  • size — The size of the image. Enter as a pixel number followed by a px.
  • align — Set whether the image floats left or right. Defaults to left if not defined. Note that you can also use "position" as the name for this parameter.
  • caption — Caption to display under the image. Only displays for the thumb and caption types.
  • captionalign — Alignment of the text in the caption parameter. Options are: left, right, and center. Defaults to center.
  • title — The image's tooltip. Defaults to the caption.
  • alt — The text that is displayed when the image fails to load. Defaults to the file name.
  • link — The desired link. Can be internal or external. Defaults to the image's page if left blank. If you set this to "none", then the image will not create a link at all. Note: This only changes the image's link and it does not effect the enlarge link in image thumbnails.


Examples

Here is an example of some ways to use this template.

With standard sizing, the image is simply scaled to the width specified. An example code is:

{{Image
|image    =Link YoungLink.png
|type     =frameless
|size     =100px
|link     =Link
|title    =Young Link
|align    =center
}}

This code is then shown rendered here, in a table for clarity:

Size
File:Link YoungLink.png

There is also the option of thumbnail and caption displays.

Thumbnail
{{Image
|image    =Link YoungLink.png
|type     =thumb
|size    =100px
|link     =Link
|title    =Young Link
|align    =left
|caption  =Young Link
}}
Caption
{{Image
|image    =Link YoungLink.png
|size   =100px
|link     =Link
|title    =Young Link
|align    =left
|caption  =Young Link
}}
File:Link YoungLink.png
Enlarge
Young Link
File:Link YoungLink.png
Young Link

Linking to nothing:

Caption
{{Image
|image    =Link YoungLink.png
|size    =100px
|link     =none
|title    =Young Link
|align    =left
|caption  =Young Link
}}
Thumbnail
{{Image
|image    =Link YoungLink.png
|type     =thumb
|size    =100px
|link     =none
|title    =Young Link
|align    =left
|caption  =Young Link
}}
Frameless
{{Image
|image    =Link YoungLink.png
|type     =Frameless
|size    =100px
|link     =none
|title    =Young Link
|align    =left
}}
File:Link YoungLink.png
Young Link
File:Link YoungLink.png
Enlarge
Young Link
File:Link YoungLink.png