Module:See also: திருத்தங்களுக்கு இடையிலான வேறுபாடு
Jump to navigation
Jump to search
imported>Kanags No edit summary |
imported>Lingam "--[[ -- This module produces a "See also: a, b, and c" link. It implements the -- template {{see also}}. --]] local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments -- lazily initialise local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.seeAlso(frame) mA..."-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது |
||
(வேறுபாடு ஏதுமில்லை)
| |||
15:29, 27 மார்ச்சு 2024 இல் கடைசித் திருத்தம்
Documentation for this module may be created at Module:See also/doc
--[[
-- This module produces a "See also: a, b, and c" link. It implements the
-- template {{see also}}.
--]]
local mHatnote = require('Module:Hatnote')
local mHatlist = require('Module:Hatnote list')
local mArguments -- lazily initialise
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
function p.seeAlso(frame)
mArguments = require('Module:Arguments')
local args = mArguments.getArgs(frame, {parentOnly = true})
local pages = {}
for k, v in pairs(args) do
if type(k) == 'number' then
local display = args['label ' .. k] or args['l' .. k]
local page = display and
string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v
pages[#pages + 1] = page
end
end
if not pages[1] then
return mHatnote.makeWikitextError(
'no page names specified',
'Template:See also#Errors',
args.category
)
end
local options = {
selfref = args.selfref
}
return p._seeAlso(pages, options)
end
function p._seeAlso(args, options)
checkType('_seeAlso', 1, args, 'table')
checkType('_seeAlso', 2, options, 'table', true)
options = options or {}
local list = mHatlist.andList(args, true)
local text = string.format('இதனையும் பார்க்க: %s', list)
-- Pass options through.
local hnOptions = {
selfref = options.selfref
}
return mHatnote._hatnote(text, hnOptions)
end
return p