Module:Cite journal

From English Wikipedia @ Freddythechick

This is the current revision of this page, as edited by imported>GKFX at 16:05, 19 December 2021 (Create journal equivalent of Module:Cite web). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local CS1 = require('Module:Citation/CS1')

p[''] = function(frame)
	local newFrame = {
	    getParent = function(self)
	    	return frame
	    end,
	    getTitle = function(self)
	    	return 'Template:Cite journal'
	    end,
	    args = {CitationClass='journal'}
	}
	setmetatable(newFrame, {
		__index = function(t, k)
			if type(frame[k]) == 'function' then
				return function(...)
					return frame[k](frame, select(2, ...))
				end
			else
				return frame[k]
			end
		end
	})
	return CS1.citation(newFrame)
end

return p