Content deleted Content added
Kammerer55 (talk | contribs) m cleaning up |
start header function |
||
Line 37:
local link, level = getLink(page)
return '[[' .. page .. ']]' .. (link and ' [[File:Círculos Concéntricos.svg|11px]] [[' .. link .. '|' .. level .. ']]' or '')
end
local top = function(container, frame)
return frame:expandTemplate{title = 'Wikipedia category', args = {container = container}}
.. frame:expandTemplate{title = 'CatAutoTOC'}
end
p.header = function(frame)
local cat = frame.args.category~='' and frame.args.category or mw.title.getCurrentTitle().subjectPageTitle.text
local class, topic = cat:match('^(%a+)-Class vital articles in ([%a ]+)$')
if class and topic then
return top(false, frame)
.. '[[Category:Wikipedia vital articles in ' .. topic .. ' by class|' .. class .. ']]'
.. '[[Category:' .. class .. (class=='Unassessed' and '' or '-Class') .. ' vital articles by topic|' .. (topic=='an unknown topic' and 'Unknown' or topic) .. ']]'
end
class = cat:match('^Wikipedia vital articles in ([%a ]+) by class$')
if class then
return top(true, frame)
.. '[[Category:Wikipedia vital articles in ' .. topic .. '|Class]]'
.. '[[Category:Wikipedia vital articles by topic by class|' .. topic .. ']]'
end
topic = cat:match('^(%a+)-Class vital articles by topic$')
if topic then
return top(true, frame)
.. '[[Category:' .. class .. (class=='Unassessed' and '' or '-Class') .. '-Class vital articles|Topic]]'
.. '[[Category:Wikipedia vital articles by class by topic|' .. class .. ']]'
end
end
|