Module:Pagination
Appearance
Implements {{Pagination}}
local p = {}
function p.pagination(frame)
args = frame.args
prevbtn = args[1] or args.previous
nextbtn = args[2] or args.next
msg = { noprevLink = 'no link for the previous button .. help',
nonextLink = 'no link for the next button .. help',
noLink = 'no link for both the previous and next buttons .. help'
}
help = '([[template:Pagination#Errors|help]])'
pntm = '[[' .. prevbtn .. '|Previous]] [[' .. nextbtn .. '|Next]]'
if prevbtn and nextbtn == '' then
return string.format('<strong class="error">"PaginationScriptError: %s"</strong>', msg.noLink, help) else return pntm
end
end
return p