Editing Module:Labelled list hatnote
From Georgia Tech Student Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 51: | Line 51: | ||
local labels = {frame.args[1] or defaults.label} |
local labels = {frame.args[1] or defaults.label} |
||
labels[2] = frame.args[2] or labels[1] |
labels[2] = frame.args[2] or labels[1] |
||
− | labels[3] = frame.args[3] --no defaulting |
||
− | labels[4] = frame.args[4] --no defaulting |
||
local template = frame:getParent():getTitle() |
local template = frame:getParent():getTitle() |
||
local args = mArguments.getArgs(frame, {parentOnly = true}) |
local args = mArguments.getArgs(frame, {parentOnly = true}) |
||
Line 75: | Line 73: | ||
end |
end |
||
label = (#pages == 1 and labels[1] or labels[2]) or defaults.label |
label = (#pages == 1 and labels[1] or labels[2]) or defaults.label |
||
− | for k, v in pairs(pages) do |
||
− | if mHatnote.findNamespaceId(v) ~= 0 then |
||
− | label = |
||
− | ( |
||
− | #pages == 1 and |
||
− | (labels[3] or labels[1] or defaults.label) or |
||
− | (labels[4] or labels[2] or defaults.label) |
||
− | ) or defaults.label |
||
− | end |
||
− | end |
||
local text = string.format( |
local text = string.format( |
||
options.labelForm or defaults.labelForm, |
options.labelForm or defaults.labelForm, |