Module:Template

local template = {}

function template.example(frame) local result, args = '', frame.args[1] and frame.args or frame:getParent.args local success, page = pcall(function(title)       return mw.title.new( title, 'Template' )    end, args[1] ) if not success then return result end if page.namespace == 10 then page =  .. page.text ..  else page =  .. page.nsText .. ':' .. page.text ..  end for name, value in pairs( args ) do       if type( name ) == 'number' then if name ~= 1 then result = result .. ' | ' .. value .. '' end else result = result .. ' | ' .. name .. '=' .. value .. '' end end result = '' return result end

return template