Module:Sandbox/RexxS/Pagetitle
< Module:Sandbox | RexxS
--[[
Pagetitle
--]]
local p = {}
-- subjectpagetitle returns the name of the subject page when invoked from the talk page.
p.subjectpagetitle = function(frame)
return mw.title.getCurrentTitle().subjectPageTitle.text
end
-- subjectpageid returns the id of the subject page when invoked from the talk page.
p.subjectpageid = function(frame)
return mw.wikibase.getEntityIdForTitle( mw.title.getCurrentTitle().subjectPageTitle.text )
end
return p