Open main menu
Home
Random
Log in
Settings
About TechInfoDepot
Disclaimers
TechInfoDepot
Search
Editing
Module:See also
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
--[[ -- 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( 'no page names specified', 'Template:See also#Errors', 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 'See also' local links = mHatnote.formatPageTables(...) links = mw.text.listToText(links) local text = altphrase .. ': ' .. links -- Pass options through. local hnOptions = {} hnOptions.selfref = options.selfref hnOptions.extraclasses = 'boilerplate seealso' return mHatnote._hatnote(text, hnOptions) end return p
Summary:
Please note that all contributions to TechInfoDepot may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TechInfoDepot:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:See also/doc
(
edit
)