Module:Taxonbar/confdoc: Difference between revisions

Content deleted Content added
m var ce
basic function for wikidataInfo() with outline table
Line 18:
'|-\n' ..
'|' .. param .. '||' .. TaxonbarProperty
end
end
return wikitable .. '\n|}'
end
--[[ p.wikidataInfo( frame )
-function to show formatURL and id for taxonomic databases
]]
 
function p.wikidataInfo( frame )
local wikitable = '{| class="wikitable sortable"\n' ..
'|-\n' ..
'! Parameter !! data-sort-type=number style="white-space: nowrap;"|Wikidata ID !! Database !! database ID !! formatterURL'
for _, db in pairs( conf.databases ) do
local param = mw.ustring.lower(db[1])
local prop = db[3]
if type(prop) == 'number' and prop > 0 then
local TaxonbarProperty = frame:expandTemplate{ title = 'Taxonbar/Property', args = { prop } }
wikitable = wikitable .. '\n' .. '|-'
.. '\n|' .. param
.. '\n|' .. '[[:d:Property:P' .. prop .. '|P' .. prop .. ']]'
.. '\n|' .. 'db'
.. '\n|' .. 'id'
.. '\n|' .. 'url'
end
end