Difference between revisions of "Template:Click"

From Twinsuniverse
Jump to: navigation, search
(updated the layout/content of the documentation page, and recategorisation)
Line 4: Line 4:
 
This template is used to create an image that points to it's article page, rather than it's file description page.
 
This template is used to create an image that points to it's article page, rather than it's file description page.
  
==Syntax==
+
Proper uses of this template includes an image gallery, where the linked-to article itself would link back to the image file page anyway.
To use this template, copy this line, and fill in the variables:
+
 
<nowiki>{{click|image=|width=|link=}}</nowiki>
+
'''''Note''': please avoid using this template on a regular basis though, as it shortcuts the convention of always linking to the file page, which is custom to MediaWiki sites like this.''
  
 
==Parameters==
 
==Parameters==
* '''image''':  
+
* '''image''': the filename to the image
* '''width''':  
+
* '''width''': the width of the rendered image (should end with "px", e.g. 200px)
* '''link''':  
+
* '''link''': the link to follow if the image is clicked (i.e. an article name)
  
'''''Note''': the '''width''' parameter should end with "px" (e.g. 200px).''
+
==Syntax==
 +
To use this template, copy this line, and fill in the variables:
 +
<nowiki>{{click|image=|width=|link=}}</nowiki>
  
 
==Example==
 
==Example==
Line 21: Line 23:
 
:{{click|image=Twinsen.jpg|width=100px|link=Twinsen}}
 
:{{click|image=Twinsen.jpg|width=100px|link=Twinsen}}
  
[[Category:Twinsuniverse - Templates]]
+
[[Category:Formatting Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 23:32, 23 May 2014

This template is used to create an image that points to it's article page, rather than it's file description page.

Proper uses of this template includes an image gallery, where the linked-to article itself would link back to the image file page anyway.

Note: please avoid using this template on a regular basis though, as it shortcuts the convention of always linking to the file page, which is custom to MediaWiki sites like this.

Parameters

  • image: the filename to the image
  • width: the width of the rendered image (should end with "px", e.g. 200px)
  • link: the link to follow if the image is clicked (i.e. an article name)

Syntax

To use this template, copy this line, and fill in the variables:

{{click|image=|width=|link=}}

Example

Filling in all parameters, this template could be used like this:

{{click|image=Twinsen.jpg|width=100px|link=Twinsen}}

Twinsen.jpg