Module:Sandbox/ProcrastinatingReader/ib: Difference between revisions

Content deleted Content added
+
c
Line 10:
end
 
local function getNetValue(frame, argType, argName)
local args = getArgs(frame)
local argType = args['arg_type']
local net = args['area_'..argType..'_'..argName] or dataValue(frame, args['subdivision_name'], 'area_'..argType..'_'..argName, args['name'])
return net
Line 32 ⟶ 33:
function p.area(frame)
local args = getArgs(frame)
local argType = args['arg_type']
return frame:expandTemplate{ title = 'infobox_settlement/areadisp', args = {
['km2'] = getNetValue(frame, argType, 'km2'),
['ha'] = args[getNetValue(frame, 'area_ha'..argType..'_ha']),
['acre'] = args[getNetValue(frame, 'area_acre'..argType..'_acre']),
['sqmi'] = args[getNetValue(frame, 'area_sq_mi'..argType..'_sq_mi']),
['dunam'] = args[getNetValue(frame, 'area_dunam'..argType..'_dunam']),
['link'] = args['dunam_link'],
['pref'] = args['unit_pref'],