Module:Redirect hatnote: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
m (Simplified conditional (no change to behaviour)) |
(Added category tracking for unusual early termination behaviour when first use is "other uses") |
||
Line 130: | Line 130: | ||
text[#text + 1] = mw.text.listToText(formattedRedirect) .. ' ' .. (#redirect == 1 and 'redirects' or 'redirect') .. ' here.' |
text[#text + 1] = mw.text.listToText(formattedRedirect) .. ' ' .. (#redirect == 1 and 'redirects' or 'redirect') .. ' here.' |
||
text[#text + 1] = formatUseTable(data[1] or {}, true, redirect) |
text[#text + 1] = formatUseTable(data[1] or {}, true, redirect) |
||
if data[1] and data[1].use |
if data[1] and data[1].use then |
||
if data[1].use ~= 'other uses' then |
|||
for i = 2, #data do |
|||
text[#text + 1] = formatUseTable(data[i] or {}, false, redirect) |
text[#text + 1] = formatUseTable(data[i] or {}, false, redirect) |
||
end |
|||
else |
|||
text[#text] = text[#text] .. '[[Category:Hatnote templates using unusual parameters]]' |
|||
end |
end |
||
end |
end |