Difference between revisions of "Template:Navimg"

From Worms Knowledge Base

Jump to: navigation, search
(add note)
(Notes)
Line 23: Line 23:
 
===Notes===
 
===Notes===
 
* 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<nowiki>{{!}}</nowiki>WKB</code> instead of <code><nowiki>[[Main Page|WKB]]</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 pipe character "<code>|</code>" (for internal links) and the equal sign "<code>=</code>" (in URLs) '''must be escaped with <code><nowiki>{{!}}</nowiki></code> or <code><nowiki>{{=}}</nowiki></code>''' inside the "link" parameter.
+
* The equal sign "<code>=</code>" in URLs '''must be escaped with <code>&#123;&#123;=}}</nowiki></code>''' if used in the unnamed parameter. For example: <code>&#123;&#123;navimg|Wkblarge.png|<nowiki>http://worms2d.info/?title</nowiki>'''&#123;&#123;=&#125;&#125;'''Main_Page&#125;&#125;</code>
  
 
====To admins:====
 
====To admins:====
 
If you're upgrading the MediaWiki engine, please also change the template code to the one like [[:w:Template:Click|Template:Click]] in wikipedia. This template will be deprecated in MediaWiki 1.14 or later.</noinclude>
 
If you're upgrading the MediaWiki engine, please also change the template code to the one like [[:w:Template:Click|Template:Click]] in wikipedia. This template will be deprecated in MediaWiki 1.14 or later.</noinclude>

Revision as of 11:56, 9 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 instead of [[Main Page]], for example)
  • The equal sign "=" in URLs must be escaped with {{=}}</nowiki> if used in the unnamed parameter. For example: {{navimg|Wkblarge.png|http://worms2d.info/?title{{=}}Main_Page}}

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