Module:PersonPage: Difference between revisions

From The Seven Sages of Rome
No edit summary
m Noeth moved page Module:RedirectTo to Module:PersonPage without leaving a redirect
(No difference)

Revision as of 17:25, 14 March 2025

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

local p = {}

function p.render(frame)
    local args = frame:getParent().args
    local canonicalName = args['Has Canonical Name']

    if canonicalName and canonicalName ~= '' then
        -- This outputs ONLY the redirect if Has Canonical Name is set
        return '#REDIRECT [[' .. canonicalName .. ']]'
    end

    -- Otherwise return nothing and allow page content to be displayed
    return ''
end

return p