Difference between revisions of "Template:Infobox settlement/metric"

From blackwiki
Jump to navigation Jump to search
imported>Jonesey95
(Undid revision 980749937 by Jonesey95 (talk). strips decimal points)
imported>Jonesey95
(This should work better; strip commas but leave decimal points)
 
Line 1: Line 1:
<includeonly>{{formatnum:{{{metv}}}}}{{{s|&nbsp;}}}{{{metu|m}}} ({{formatnum:{{{impv}}}}}{{{s|&nbsp;}}}{{{impu|ft}}}{{#ifeq:{{{impv|0}}}|1||{{#ifeq:{{{s}}}|/||{{#ifeq:{{{impu}}}|acre|s}}}}}})</includeonly><noinclude>
+
<includeonly>{{formatnum:{{replace|{{{metv}}}|,|}}}}{{{s|&nbsp;}}}{{{metu|m}}} ({{formatnum:{{replace|{{{impv}}}|,|}}}}{{{s|&nbsp;}}}{{{impu|ft}}}{{#ifeq:{{{impv|0}}}|1||{{#ifeq:{{{s}}}|/||{{#ifeq:{{{impu}}}|acre|s}}}}}})</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 06:57, 28 September 2020

Template documentation[view] [edit] [history] [purge]

Usage

This is a subtemplate of {{Infobox settlement}}. It is not intended to be used directly. It is called by the following subtemplates.

It displays a quantity in terms of metric units and imperial/US customary units. The metric units are first with the imperial/US customary units in brackets as determined by {{Infobox settlement/pref}}.

It takes the following parameters.

  • {{{metv}}} (required) — the numerical value of the metric value
  • {{{impv}}} (required) — the numerical value of the imperial/US value
  • {{{metu}}} (optional: defaults to "m") — the symbol/abbreviation of the metric unit (or inverse unit)
  • {{{impu}}} (optional: defaults to "ft") — the symbol/abbreviation of the imperial/US unit (or inverse unit)
  • {{{s}}} (optional: defaults to a non-breaking space) — the separator between numeral and (inverse) unit: set to "/" for inverse units

See also

Similar subtemplates of {{Infobox settlement}}
Other subtemplates of {{Infobox settlement}}
Cleaner