Module:Infobox: Difference between revisions
m forgot the lower links |
Module:Rank-n scale (not called "Infobox rank-n" so it slipped by me) still uses build-multilink, so added back function for that |
||
| Line 1: | Line 1: | ||
local getArgs = require("Module:Arguments").getArgs | local getArgs = require("Module:Arguments").getArgs | ||
local p = {} | local p = {} | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
| Line 202: | Line 198: | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
------------------------------ | ------------------------------- LEGACY FUNCTIONS ------------------------------- | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
-- | -- These functions are kept in the meantime to support older infoboxes and WILL | ||
-- | -- be entirely deleted later! Please switch to the new functions! | ||
-- Original function signature, kept for legacy support (for now). | |||
function p.build(title, entries, prev_link, next_link) | function p.build(title, entries, prev_link, next_link) | ||
local args = { | local args = { | ||
["Adjacent Links"] = { (prev_link or ""), (next_link or "") }, | ["Adjacent Links"] = { (prev_link or ""), (next_link or "") }, | ||
["Title"] = title, | |||
["Rows"] = entries, | |||
} | |||
return p._infobox(args) | |||
end | |||
-- Original 8-link function signature, pulled from infobox mos. (Literally only | |||
-- one module left uses this: Rank-n scale, and it's confusingly not called | |||
-- "Infobox rank-n"?) | |||
function p.build_multilink(title, entries, adjacent_links) | |||
local args = { | |||
["Adjacent Links"] = adjacent_links, | |||
["Title"] = title, | ["Title"] = title, | ||
["Rows"] = entries, | ["Rows"] = entries, | ||