Module:Sandbox/RexxS/Pagetitle: Difference between revisions
< Module:Sandbox | RexxS
imported>RexxS rm debug |
(No difference)
|
Latest revision as of 01:32, 24 September 2020
Documentation for this module may be created at Module:Sandbox/RexxS/Pagetitle/doc
--[[
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