Mòideal:Taxonbar/confdoc
Coltas
(deasbaireachd⧼tpt-languages-separator⧽ ⧼tpt-languages-separator⧽eachdraidh⧼tpt-languages-separator⧽ceanglaichean⧼tpt-languages-separator⧽doc⧼tpt-languages-separator⧽bogsa-gainmhich⧼tpt-languages-separator⧽cùisean deuchainn)
This module is currently protected from editing. See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This page is not a sandbox. It should not be used for test editing. To experiment, please use the Wikipedia sandbox, your user sandbox, or the other sandboxes. |
Tuairisgeul - Description
This module allows Mòideal:Taxonbar/conf to automatically update its own documentation table of Wikidata taxon ID properties on Teamplaid:Taxonbar/documentation.
Ùsaid - Usage
{{#invoke:Taxonbar/confdoc|confdoc}}
require('Mòideal:No globals')
local conf = require( "Mòideal:Taxonbar/conf" ) -- configuration module
local p = {}
function p.confdoc( frame )
local wikitable = '{| class="wikitable sortable"\n' ..
'|-\n' ..
'! Parameter !! data-sort-type=number style="white-space: nowrap;"|Wikidata ID !! Authority !! Description'
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 .. '||' .. TaxonbarProperty
end
end
return wikitable .. '\n|}'
end
return p