Module:Shortcut: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(sync from sandbox, editrequest on talk)
(remove the first parameter error category per Template talk:Shortcut#The cleanup category should be removed)
Line 94: Line 94:
for i, item in ipairs(listItems) do
for i, item in ipairs(listItems) do
shortcutList:tag('li'):wikitext(item)
shortcutList:tag('li'):wikitext(item)
end

-- Output an error category if the first shortcut doesn't exist
if isCategorized
and shortcuts[1]
and cfg['first-parameter-error-category']
then
local title = mw.title.new(shortcuts[1])
if not title or (not title.exists and title.interwiki == '') then
root:wikitext(makeCategoryLink(cfg['first-parameter-error-category']))
end
end
end