Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Citation/CS2: Difference between revisions

Created page with 'local p = {} local CS1 = require('Module:Citation/CS1') p[''] = function(frame) local newFrame = { getParent = function(self) return frame end, getTitle = function(self) return 'Template:Citation' end, args = {CitationClass='citation'} } setmetatable(newFrame, { __index = function(t, k) if type(frame[k]) == 'function' then return function(...) return frame[k](frame, select(2, ...)) end else r...'
 
m 1 revision imported: Import "Module:Citation/CS2" for better references and citations.
 
(No difference)

Latest revision as of 20:48, 24 September 2023

Usage

This module may be placed directly on articles by replacing {{Citation| with {{#invoke:Citation|| (note the double pipe). This is likely to be unclear to other editors and should only be done to prevent pages exceeding the post-expand include size limit. It is also fine to use in templates that wrap {{Citation }}.

For the module that actually implements {{Citation }}, see Module:Citation/CS1.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Citation in articles based on its TemplateData.

TemplateData for Citation

This module is like {{Citation}} with two exceptions. It is only for use on pages with lots of citations (e.g. several hundred) where that is causing technical problems, and you must pass an empty first parameter. For all other usage information, see [[Template:Citation]].

Template parameters

ParameterDescriptionTypeStatus
Required blank parameter1

no description

Unknownoptional

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

p[''] = function(frame)
	local newFrame = {
	    getParent = function(self)
	    	return frame
	    end,
	    getTitle = function(self)
	    	return 'Template:Citation'
	    end,
	    args = {CitationClass='citation'}
	}
	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