查看“模块:See also”的源代码
←
模块:See also
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看和复制此页面的源代码。
--[[ -- This module produces a "See also: a, b and c" link. It implements the -- template {{see also}}. --]] local mHatnote = require('Module:Hatnote') local mTableTools -- lazily initialise local mArguments -- lazily initialise local p = {} function p.seeAlso(frame) mTableTools = require('Module:TableTools') 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 numstring = tostring(k) local display = args['label ' .. numstring] or args['l' .. numstring] local page = {v, display} pages[k] = page end end pages = mTableTools.compressSparseArray(pages) if not pages[1] then return mHatnote.makeWikitextError( '未指定页面名称', 'Template:See also#错误', args.category ) end local options = { altphrase = args.altphrase, selfref = args.selfref } return p._seeAlso(options, unpack(pages)) end function p._seeAlso(options, ...) local altphrase = options and options.altphrase or '参见' local links = mHatnote.formatPageTables(...) links = mw.text.listToText(links) local text = altphrase .. ':' .. links -- Pass options through. local hnOptions = {} hnOptions.selfref = options.selfref hnOptions.extraclasses = 'rellink boilerplate seealso noprint' return mHatnote._hatnote(text, hnOptions) end return p
该页面使用的模板:
模块:See also/doc
(
查看源代码
)
返回至
模块:See also
。
导航菜单
个人工具
登录
名字空间
模块
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息