Module:Infobox: Difference between revisions

Ganaram inukshuk (talk | contribs)
comments; removed 8-link build function (only ever used by infobox mos, and that now uses the new infobox function)
Ganaram inukshuk (talk | contribs)
comments; default value for link count is 8
Line 133: Line 133:
-- - 7: next_B,   
-- - 7: next_B,   
-- - 8: next_A, next_B
-- - 8: next_A, next_B
-- Leaving this field nil defaults to only having the title; individual
-- Individual links can be omitted. Specifying a link count technically is
-- links, as with "border" cases (eg, nothing comes before 0edo), can be
-- not necessary, but it defaults to 8.
-- left blank. Missing/nil links default to blank. Not specifying a link
-- count defaults to no links.
local adjacent_links = {}
local adjacent_links = {}
local link_count = tonumber(args["Link Count"]) -- This is 0, 2, or 8
local link_count = tonumber(args["Link Count"] or 8) -- This is 0, 2, or 8
if link_count == 2 then
if link_count == 2 then
table.insert(adjacent_links, args["Left Link" ] or "")
table.insert(adjacent_links, args["Left Link" ] or "")