Module:Main page link

From Team Fortress Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:Main page link/doc

local p = {}

function p.check(f)
    local pageTitle = tostring(mw.title.getCurrentTitle())
    local if_lang = f:expandTemplate{title='If lang'}

    -- Same way we handle the CSS logo
    if pageTitle:find(" %(Classic%)") then
        return "Main Page (Classic)" .. if_lang
    else
        return "Main Page" .. if_lang
    end
end

return p