Module:Cite web: Difference between revisions

From Vigyanwiki
(Created page with "local p = {} local CS1 = require('Module:Citation/CS1') p[''] = function(frame) local newFrame = { getParent = function(self) return frame end, getTitle...")
m (1 revision imported from alpha:Module:Cite_web)
 
(No difference)

Latest revision as of 10:52, 7 February 2023

Documentation for this module may be created at Module:Cite web/doc

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 web'
	    end,
	    args = {CitationClass='web'}
	}
	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