Module:Shortcut: Difference between revisions
Content added Content deleted
Enwikipedia>Xaosflux (sync from sandbox, editrequest on talk) |
Enwikipedia>Mr. Stradivarius (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 |
||