మాడ్యూల్:Details: కూర్పుల మధ్య తేడాలు

Content deleted Content added
Moved tracking apparatus so that only pages using the old parameterization are categorized
Updated from sandbox. Adds support for an indefinite number of pages, removes tracking apparatus used for reparameterization
పంక్తి 5:
 
local mHatnote = require('Module:Hatnote')
local mHatlist = require('Module:Hatnote list')
local mArguments -- lazily initialise
local mTableTools -- lazily initialise
 
local p = {}
 
function p.details (frame)
mArguments = require('Module:Arguments')
mTableTools = require('Module:TableTools')
local args = mArguments.getArgs(frame, {parentOnly = true})
local pagetopic, category = args[1].topic, args.category
local options = {selfref = args.selfref,}
local topic = args.topic or (args[2] and args[2] .. '[[Category:Pages using details hatnote with topic specified]]')
args = mTableTools.compressSparseArray(args)
if not#args page== 0 then
return mHatnote.makeWikitextError(
'no page name specified',
'Template:Details#Errors',
args.category
)
end
return p._details(pageargs, topic, options)
local options = {
selfref = args.selfref,
}
return p._details(page, topic, options)
end
 
function p._details (pagelist, topic, options)
list = mHatlist.andList(list, true)
page = mHatnote._formatLink(page)
topic = topic or 'this topic'
local text = string.format('For more details on %s, see %s.', topic, pagelist)
options = options or {}
return mHatnote._hatnote(text, options)
end
"https://te.wikipedia.org/wiki/మాడ్యూల్:Details" నుండి వెలికితీశారు