Difference between revisions of "Template:Navimg"
From Worms Knowledge Base
Explorer09 (Talk | contribs) m |
Explorer09 (Talk | contribs) (new template code (for MediaWiki 1.14+)) |
||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>[[File:{{{image|{{{1}}}}}}{{#if:{{{size|}}}{{{xsize|}}}{{{width|}}}{{{4|}}} | {{!}}{{{size|{{{xsize|{{{width|{{{4}}}}}}}}}}}}px }} |
− | + | {{#if:{{{link|}}}{{{2|}}} | {{!}}link={{{link|{{{2}}}}}} }} | |
− | {{#if:{{{link|}}}{{{2|}}}| | + | |alt={{{alt|{{{tooltip|{{{3|{{{link|{{{2|}}}}}}}}}}}}}}} |
− | + | |{{{tooltip|{{{3|{{{link|{{{2}}}}}}}}}}}}]]</includeonly><noinclude>__NOTOC__ | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
===Usage=== | ===Usage=== | ||
<nowiki>{{</nowiki> Navimg<br/> | <nowiki>{{</nowiki> Navimg<br/> | ||
Line 24: | Line 19: | ||
* If the "alt" parameter is not specified, the alt text will be the same as the tooltip. | * 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 <code>Main Page</code> instead of <code><nowiki>[[Main Page]]</nowiki></code>, for example) | * Do not add square brackets in the "link" parameter. (use <code>Main Page</code> instead of <code><nowiki>[[Main Page]]</nowiki></code>, for example) | ||
− | * The equal sign "<code>=</code>" in URLs '''must be escaped with <code>{{=}}</code>''' if used in the unnamed parameter. For example: <code>{{navimg|Wkblarge.png|<nowiki>http://worms2d.info/?title</nowiki>'''{{=}}'''Main_Page}}</code> | + | * The equal sign "<code>=</code>" in URLs '''must be escaped with <code>{{=}}</code>''' if used in the unnamed parameter. For example: <code>{{navimg|Wkblarge.png|<nowiki>http://worms2d.info/?title</nowiki>'''{{=}}'''Main_Page}}</code></noinclude> |
− | + | ||
− | + | ||
− | + |
Revision as of 10:07, 19 September 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
instead of[[Main Page]]
, for example) - The equal sign "
=
" in URLs must be escaped with{{=}}
if used in the unnamed parameter. For example:{{navimg|Wkblarge.png|http://worms2d.info/?title{{=}}Main_Page}}