Module:Main page link
This module is used in the sidebar to direct users to the "correct" version of the main page. Works similarly to the CSS logo switcher.
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