Module:RfD

This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 20:59, 20 June 2014 (simplify again using Module:Redirect). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

local getTargetFromText

-- called if the redirect up for discussion is being transcluded
p['1'] = function(frame)
	if not getTargetFromText then
		getTargetFromText = require('Module:Redirect').getTargetFromText
	end
	return frame:getParent():preprocess(mw.title.new(getTargetFromText(frame.args[2])):getContent())
end

-- called if the redirect up for discussion is being viewed
p[''] = function(frame)
	return frame.args[1] .. frame.args[2]
end

return p