Open main menu

Changes

Module:Authority control

653 bytes added, 15:59, 25 May 2018
+function p.confDoc -- Creates a human-readable standalone wikitable version of p.conf for use in the documentation, from sandbox, per talk suggestion
return '* <span class="error">The ' .. id .. ' id ' .. rawValue .. ' is not valid.</span>[[Category:Wikipedia articles with faulty authority control identifiers (' .. id .. ')]]\n'
end
 
-- Creates a human-readable standalone wikitable version of p.conf for use in the documentation
function p.confDoc( frame )
local wikiTable = '{| class="wikitable sortable"\n' ..
'! Parameter !! Label !! data-sort-type=number | Wikidata property'
for _, conf in pairs( p.conf ) do
local param = conf[1]
local link = conf[2]
local pid = conf[3]
local args = { id = 'f', pid }
local WPL = frame:expandTemplate{ title = 'Wikidata property link', args = args }
wikiTable = wikiTable .. '\n' ..
'|-\n' ..
'|' .. param .. '||' .. link .. '||data-sort-value=' .. pid .. '|' .. WPL
end
return wikiTable .. '\n|}'
end
Anonymous user