Difference between revisions of "Template:Navimg"

From Worms Knowledge Base

Jump to: navigation, search
m (minor description fix)
m
Line 1: Line 1:
 
<includeonly>{{#tag:imagemap|
 
<includeonly>{{#tag:imagemap|
 
Image:{{{image|{{{1}}}}}}{{#if:{{{size|}}}{{{xsize|}}}{{{width|}}}{{{4|}}}|{{!}}{{{size|{{{xsize|{{{width|{{{4}}}}}}}}}}}}px}}{{!}}{{{alt|{{{tooltip|{{{3|{{{link|{{{2|&nbsp;}}}}}}}}}}}}}}}
 
Image:{{{image|{{{1}}}}}}{{#if:{{{size|}}}{{{xsize|}}}{{{width|}}}{{{4|}}}|{{!}}{{{size|{{{xsize|{{{width|{{{4}}}}}}}}}}}}px}}{{!}}{{{alt|{{{tooltip|{{{3|{{{link|{{{2|&nbsp;}}}}}}}}}}}}}}}
{{#if:{{{link|}}}{{{2|}}}
+
{{#if:{{{link|}}}{{{2|}}}|
|
+
 
default {{#switch: {{#titleparts:{{{link|{{{2}}}}}}|1|1}}
 
default {{#switch: {{#titleparts:{{{link|{{{2}}}}}}|1|1}}
 
  |Http:|Https:|Ftp:|Ftps: = [{{{link|{{{2}}}}}} {{{tooltip|{{{3|{{{link|{{{2}}}}}}}}}}}}]
 
  |Http:|Https:|Ftp:|Ftps: = [{{{link|{{{2}}}}}} {{{tooltip|{{{3|{{{link|{{{2}}}}}}}}}}}}]

Revision as of 14:33, 8 March 2010

Usage

{{ Navimg
| image (1) = file.png
| link (2) = image link (e.g. Main Page (internal link) or http://worms2d.info/ (external link))
| tooltip (3) = tooltip
| size (4) / xsize / width = image size (e.g. 100 or 200x150)
| alt = alternate text
}}

{{ Navimg | image | link | tooltip | size }}

The "image" and "link" parameter are required; the others are optional.

Notes

  • If the "alt" parameter is not specified, the alt text will be the same as the tooltip.
  • Do not add square brackets in the "link" parameter. (use Main Page{{!}}WKB instead of [[Main Page|WKB]], for example)

To admins:

If you're upgrading the MediaWiki engine, please also change the template code to the one like Template:Click in wikipedia. This template will be deprecated in MediaWiki 1.14 or later.

Personal tools