Jump to content

User:Will Pittenger/templates/Clickable Image

From Wikipedia, the free encyclopedia


This is a version of {{click}} that ensured the underscores in links are suppressed. That was ending up on top of the image.


Documentation

[edit]

This template causes an image to link to a specified page when clicked, rather than its image description page. It should be used sparingly as image description pages contain copyright information and should normally be easily accessible.

Syntax

[edit]

Definitions of parameters

[edit]
Name Purpose Default
{{{image}}} Where the image is at
{{{link}}} Where to link to. With this template, you can specify any internal or interwiki link. For external links, please use {{User:Will Pittenger/templates/Clickable Image With External Link}}.
{{{width}}} How wide you want the image — Note: This template can't size the blank spot in front of the image from the image itself. It is important you specify how large to make that spot. There is a maximum width of 100 pixels. Please specify this as "8px" where the "8" represents your size.
{{{height}}} How tall you want the image — Note: This template can't size the blank spot in front of the image from the image itself. This means that we can't determine the height from the width. It is important you specify how large to make that spot. There is a maximum height of 100 pixels. Please specify this as "8px" where the "8" represents your size.
Examples of Standard Usage
[edit]
{{User:Will Pittenger/templates/Clickable Image
| image =Nuvola_filesystems_www.png
| link = :Category:Geography
| width = 40px
| height = 40px
}}


{{User:Will Pittenger/templates/Clickable Image
| image = Wikinews-logo-textless.png
| link = n:Main Page
| width = 35px
| height = 19px
}}


Unlinked image

[edit]

This template can also be used to produce images that are not clickable, by using as the link parameter:

link = {{FULLPAGENAME}}

The cursor can also be changed to appear normal when over the image by using styles

Demo with an Unlinked Image
[edit]
<div style="cursor:default;">
{{User:Will Pittenger/templates/Clickable Image
| image = Nuvola mimetypes info.png 
| Link = {{FULLPAGENAME}}
| width = 30px 
| height = 30px
}}
</div>