Module:Page
Appearance
Documentation for this module may be created at Module:Page/doc
local p = {}
function p.transcludeAsCommentsIfDefined(frame)
local pageName = frame.args[1]
if not pageName or pageName == '' then return '' end
local title = mw.title.new(pageName)
if title and title.exists then
return frame:expandTemplate{
title = 'comments',
args = {
Observations = frame:preprocess('{{' .. title.prefixedText .. '}}')
}
}
end
return ''
end
return p