From TrainzOnline
Revision as of 00:24, 10 July 2013 by Fabartus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This template encapsulates an icon sized image in a self-defined independent table defined as below.

  • It is used primarily as a table element in a table breaking out page links where an icon such as surveyor tools buttons is desired.
<table><tr><td max-width="{{{max|40px}}}">[[image:{{{img|{{{1|wikilogo.png}}}}}}
which decomposed looks...

<table><tr><td max-width="{{{max|40px}}}">






This means a call with all parameters defined would appear: {{{{#if:| }}icon{{#if:| | {{{2}}} }}{{#if:| | {{{3}}} }}{{#if:| | {{{4}}} }}{{#if:| | {{{5}}} }}{{#if:| | ... }}{{#if:| }}}}

... or since parserFunctions aren't currently enabled:


so the parameters can be defined to override the defaults as follows:

# parameter
Parameter effects description, limits and bounds
1 |max= a where a is a width in pixels setting the maximum width of the bounding table
2 |img= b where b is a namespace-less image file name in the File Namespace.
3 |size=c where c is a width in pixels (px), which for icons is normally given as a cross-spec such as '64x64px' or '32x32px'.
4 |cap=d where d is a caption, which is an extension of the template for other than icon uses. Icons do not get captions.
n/a |alt= above may appear to be a parameter, but is an HTML void definition for the normal alt= define in web page rendering under HTML. In effect it is Nullified.


  • Since the template is used within wikitables by design, failure to properly close the parentheses may lead to spectacular looking crude.
Expanding the template onto several lines may be problematic.
  • If you do so, indent each pipe character at least one or two spaces like the below:


Personal tools