Open main menu

Changes

Module:Citation

493 bytes added, 00:05, 28 August 2012
Added support for Template:notelist.
end
return z.wikitext.tag(frame, {name="ref",contents="",params={name=name,group=group}}) .. p
end
 
function reflist0(frame, args)
local contents = args.refs or ""
local liststyle = args.liststyle
local count = args[1]
local width = args.colwidth
local group = args.group
local params = {}
if ( nil == tonumber(count) and nil == width ) then
width = count
count = nil
end
if ( nil == liststyle ) then
if ( "upper-alpha" == group or "lower-alpha" == group or "upper-roman" == group or "lower-roman" == group or "upper-greek" == group or "lower-greek" == group ) then
liststyle = group
else
liststyle = "decimal"
end
end
params.class = "reflist"
params.style = z.wikitext.liststyle(liststyle)
if ( nil ~= count ) then
params.class = params.class .. " references-column-count references-column-count-" .. count
params.style = params.style .. " " .. z.wikitext.columncountstyle(count)
end
if ( nil ~= width ) then
params.class = params.class .. " references-column-width"
params.style = params.style .. " " .. z.wikitext.columnwidthstyle(width)
end
local references = z.wikitext.tag(frame, {name="references",contents=contents,params={group=group}})
return z.wikitext.tag(frame, {name="div",contents=references,params=params})
end
local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template
local contents = args.refs or "" local liststyle = args.liststyle local count = args[1] local width = return reflist0(frame, args.colwidth local group = args.group local params = {} if ( nil == tonumber(count) and nil == width ) then width = count count = nil end if ( nil == liststyle ) then if ( "upper-alpha" == group or "lower-alpha" == group or "upper-roman" == group or "lower-roman" == group or "upper-greek" == group or "lower-greek" == group ) then liststyle = group else liststyle = "decimal" end end paramsThis is used by template {{notelist}}.class = "reflist" params.style = function z.wikitext.liststylenotelist(liststyleframe) if local pframe = frame:getParent( nil ~= count ) then params.class local config = paramsframe.class .. " referencesargs -column-count references-column-count-" .. count params.style = params.style .. " " .. z.the arguments passed BY the template, in the wikitext.columncountstyle(count)of the template itself end if ( nil ~local args = width ) then paramspframe.class = params.class .. " referencesargs -column-width" params.style = params.style .. " " .. z.the arguments passed TO the template, in the wikitext.columnwidthstyle(width)that instantiates the template end local references args.group = zargs.wikitext.tag(frame, {name=group or "referenceslower-alpha",contents=contents,params={group=group}}) return z.wikitext.tagreflist0(frame, {name="div",contents=references,params=params}args)
end
Anonymous user