Module:PersonPage

From The Seven Sages of Rome
Revision as of 17:22, 14 March 2025 by Noeth (talk | contribs) (Created page with "local p = {} function p.redirect(frame) local target = frame.args[1] or frame:getParent().args[1] -- Basic validation if not target or target == '' then return 'No target page specified.' end -- Return the redirect with no extra whitespace return '#REDIRECT ' .. target .. '' end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:PersonPage/doc

local p = {}

function p.redirect(frame)
    local target = frame.args[1] or frame:getParent().args[1]
    
    -- Basic validation
    if not target or target == '' then
        return 'No target page specified.'
    end

    -- Return the redirect with no extra whitespace
    return '#REDIRECT [[' .. target .. ']]'
end

return p