Template:Click: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span class="plainlinks">{{#ifeq:{{{link|{{FULLPAGENAME}}}}}<!-- | <includeonly><span class="plainlinks">{{#ifeq:{{{link|{{FULLPAGENAME}}}}}<!-- | ||
-->|{{FULLPAGENAME}}<!-- | -->|{{FULLPAGENAME}}<!-- | ||
-->|[[File:{{{img|Empty.png}}}|middle]]<!-- | -->|[[File:{{{img|Empty.png}}}|middle|{{{size|32px}}}]]<!-- | ||
-->|<!-- | -->|<!-- | ||
-->[[File:{{{img|Empty.png}}}|middle|{{{size|32px}}}|link={{{link|{{FULLPAGENAME}}}}}]]}}</span></includeonly><!-- | |||
--><noinclude> | --><noinclude> | ||
== About == | |||
Inserted images normally refer to the corresponding ''File:''-page, which is not intuitive for some cases. This template provides a method to make an image a direct link to a target instead. | |||
==Usage== | == Parameter-Usage == | ||
Example | {| class="wikitable" | ||
!Parameter | |||
!Example | |||
!Description | |||
|- | |||
!link | |||
|Sunglasses | |||
|Linktarget | |||
|- | |||
!img | |||
|SGlasses.png | |||
|Image to be displayed, default Empty.png | |||
|- | |||
!size | |||
|32px | |||
|Size of the image, default 32px | |||
|} | |||
< | == Examples == | ||
=== Minimal === | |||
<pre>{{click | |||
|img=SGlasses.png | |||
|link=Sunglasses | |||
}}</pre> | |||
{{click|img=SGlasses.png|link=Sunglasses}} | |||
[[Category:Templates]]</noinclude> | === Missing image === | ||
<pre>{{click | |||
|link=Sunglasses | |||
}}</pre> | |||
{{click|link=Sunglasses}} | |||
=== Full with adjusted size === | |||
<pre>{{click | |||
|img=SGlasses.png | |||
|link=Sunglasses | |||
|size=64px | |||
}}</pre> | |||
{{click|img=SGlasses.png|link=Sunglasses|size=64px}} | |||
[[Category:Templates]] | |||
</noinclude> |
Latest revision as of 09:33, 18 July 2022
About
Inserted images normally refer to the corresponding File:-page, which is not intuitive for some cases. This template provides a method to make an image a direct link to a target instead.
Parameter-Usage
Parameter | Example | Description |
---|---|---|
link | Sunglasses | Linktarget |
img | SGlasses.png | Image to be displayed, default Empty.png |
size | 32px | Size of the image, default 32px |
Examples
Minimal
{{click |img=SGlasses.png |link=Sunglasses }}
Missing image
{{click |link=Sunglasses }}
Full with adjusted size
{{click |img=SGlasses.png |link=Sunglasses |size=64px }}