Open main menu

Yugipedia β

Template:Image width/doc

< Template:Image width

UsageEdit

This template is meant to normalize values supplied for image widths. It should be used in conjunction with {{px}}.

It takes two unnamed parameters, the first being the value to test and the second being the fallback value. If the first parameter is not supplied, not a valid number (if it has letters or other non-numeric characters), or larger than/equal to the fallback value, the fallback is used instead. If no fallback is supplied, the template returns nothing for invalid input.

Three more optional unnamed parameters are available to add tracking categories for invalid input: the third one is added in cases where the first parameter is not a valid number or is larger than/equal to the fallback parameter, the fourth parameter is added when the first parameter is larger than/equal to the fallback parameter (and overrides the third parameter), and the fifth parameter is added if no input is supplied for the first parameter.

See alsoEdit