66 513
contributi
(SkipItem and QList implemented) |
(Auto generated categories) |
||
Riga 160: | Riga 160: | ||
end | end | ||
function p.UpperCategoryTree(frame) | function p.UpperCategoryTree(frame) | ||
return table.concat(p.PropertiesOnTree("P69", 1, true)) | local AZInstancesMember = {Q23 = "Personaggi", Q18 = "Specie", Q95 = "Pianeti", Q19 = "Cast"} | ||
local CurrentItem = mw.wikibase.getEntity() | |||
local AZCategory = '' | |||
if AZInstancesMember[CurrentItem.claims['P14']] ~= nil then | |||
-- Generate auto A-Z Category | |||
-- TDOO generate 09 for numeric labels | |||
local FirstLetter = string.upper(string.sub(wikibase.getLabel(), 1, 1)) | |||
AZCategory = "[[Category:" .. AZInstancesMember[CurrentItem.claims['P14']] .. " - " .. FirstLetter .. "]]" | |||
end | |||
return (table.concat(p.PropertiesOnTree("P69", 1, true))) .. AZCategory | |||
end | end | ||
function p.IconTree(frame) | function p.IconTree(frame) |