Module:NIE

require('strict')

local p = {}

local getArgs = require('Module:Arguments').getArgs local header = require('Module:Header')._header

function p.NIE(frame) local args = getArgs(frame) local current_title = mw.title.getCurrentTitle local cats = {} args.title =  .. current_title.rootText ..  if args.volume then args.title = args.title .. ', Volume ' .. args.volume .. '' else table.insert(cats, '') end args.contributor = args.author or args.contributor args.author = nil args.section = args.section or current_title.subpageText if args.previous then args.previous = '../' .. args.previous .. '/' end if args['next'] then args['next'] = '../' .. args['next'] .. '/' end args.notes = args.override_notes if not args.notes then local notes_table = {} if args.edition then table.insert(notes_table, 'Edition of ' .. args.edition .. '.') end local see_also_table = {} if args.wikipedia or args.wikipedia2 then local wikipedia_table = {} if args.wikipedia then table.insert(wikipedia_table,  .. args.wikipedia .. ) end if args.wikipedia2 then table.insert(wikipedia_table,  .. args.wikipedia2 .. ) end table.insert(see_also_table, table.concat(wikipedia_table, ' and ') .. ' on Wikipedia') end args.wikipedia = nil if args.other_projects then table.insert(see_also_table, args.other_projects) end table.insert(see_also_table, 'the disclaimer') local see_also_text = see_also_table[#see_also_table] if #see_also_table > 1 then see_also_text = table.concat(see_also_table, '; ', 1, #see_also_table - 1) .. '; and ' .. see_also_table[#see_also_table] end see_also_text = "\'\'\'See also\'\'\' " .. see_also_text .. '.'		table.insert(notes_table, see_also_text) args.notes = table.concat(notes_table, ' ') end if args.extra_notes then args.notes = args.notes .. ' ' .. args.extra_notes end if not current_title:inNamespace(0) then cats = {} end return header(args) .. table.concat(cats) end

return p