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

From blackwiki
Jump to navigation Jump to search
imported>Primefac
m (Protected "Template:Infobox settlement/dunam": semi-protecting highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirm...)
imported>Jonesey95
(fix invalid input to formatnum causing articles to appear in Category:Pages with non-numeric formatnum arguments)
 
Line 1: Line 1:
<noinclude>This produces an area in dunams plus conversions, e.g. "</noinclude>{{formatnum:{{{dunv|20}}}&nbsp;{{{dunu|dunam}}}{{#ifeq:{{{dunv}}}|1||s}} ({{{metv|2}}}&nbsp;{{{metu|ha}}}&nbsp;or&nbsp;{{{impv|5}}}&nbsp;{{{impu|acre}}}{{#ifeq:{{{impv}}}|1||{{#ifeq:{{{impu|acre}}}|acre|s}}}})}}<noinclude>".
+
<noinclude>This produces an area in dunams plus conversions, e.g. "</noinclude>{{formatnum:{{replace|{{{dunv|20}}}|,|}}}}&nbsp;{{{dunu|dunam}}}{{#ifeq:{{{dunv}}}|1||s}} ({{formatnum:{{replace|{{{metv|2}}}|,|}}}}&nbsp;{{{metu|ha}}}&nbsp;or&nbsp;{{formatnum:{{replace|{{{impv|5}}}|,|}}}}&nbsp;{{{impu|acre}}}{{#ifeq:{{{impv}}}|1||{{#ifeq:{{{impu|acre}}}|acre|s}}}})<noinclude>".
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 19:25, 28 September 2020

This produces an area in dunams plus conversions, e.g. "20 dunams (2 ha or 5 acres)".

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

Usage

This is a subtemplate of {{Infobox settlement}}. It is not intended to be used directly.

It displays an area in dunams and its equivalent in both metric and imperial/US customary units.

It is called by {{Infobox settlement/areadisp}}, which handles the conversions and calls this template with values assigned to the following parameters:

  • {{{dunv}}} (required) — the dunam value
  • {{{metv}}} (required) — the metric value
  • {{{impv}}} (required) — the imperial/US value
  • {{{dunu}}} (optional: defaults to "dunam" or "dunams") — the symbol/abbreviation of the dunam unit
  • {{{metu}}} (optional: defaults to "ha") — the symbol/abbreviation of the metric unit
  • {{{impu}}} (optional: defaults to "acre" or "acres") — the symbol/abbreviation of the imperial/US unit

See also

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