This module is being discussed in accordance with Wikipedia's deletion policy. Help reach a consensus at its entry. |
<noinclude>...</noinclude>
tags, <includeonly>...</includeonly>
tags, or <onlyinclude>...</onlyinclude>
tags. For this reason this is an experimental module, and is not intended for widespread use.
Usage
edit{{subst:#invoke:User:Mr. Stradivarius/pageSubster|main|page name}}
local p = {}
function p.main(frame)
-- Check if we are substing.
if not mw.isSubsting() then
error('this module can only be substituted', 2)
end
-- Get the title object and check that it is valid.
local success, titleObj = pcall(mw.title.new, frame.args[1])
if not success or not titleObj or not titleObj.exists then
return nil
end
-- Return the page content.
return titleObj:getContent()
end
return p