Module:Data Table/Tags: Difference between revisions
From Zelda Wiki, the Zelda encyclopedia
no edit summary
PhantomCaleb (talk | contribs) No edit summary |
PhantomCaleb (talk | contribs) No edit summary |
||
Line 34: | Line 34: | ||
local function value(templateName, hasGameParam) | local function value(templateName, hasGameParam) | ||
return { | return { | ||
formatter = function(cell, tableArgs, tagArgs) | formatter = function(cell, tableArgs, tagArgs) | ||
local values = utilsString.split(cell, '%s*,[%D+|%s*]') | local values = utilsString.split(cell, '%s*,[%D+|%s*]') | ||
Line 150: | Line 149: | ||
-- - sortValue (optional): a column sort value — column is unsortable if false, sorted by its content if nil | -- - sortValue (optional): a column sort value — column is unsortable if false, sorted by its content if nil | ||
-- noCopy (optional): if set to true, the tag will not be automatically carried over to copies of the table | -- noCopy (optional): if set to true, the tag will not be automatically carried over to copies of the table | ||
contentTags = { | contentTags = { | ||
Line 181: | Line 179: | ||
}, | }, | ||
["NotApplicable"] = { | ["NotApplicable"] = { | ||
formatter = function(cell) -- special case: cell starts with N/A | formatter = function(cell) -- special case: cell starts with N/A | ||
local text, info = utilsMarkup.separateMarkup(cell) | local text, info = utilsMarkup.separateMarkup(cell) | ||
Line 194: | Line 191: | ||
["Amounts"] = { | ["Amounts"] = { | ||
formatter = function(cell, tableArgs, tagArgs) | formatter = function(cell, tableArgs, tagArgs) | ||
local text = frame:expandTemplate({ | local text = frame:expandTemplate({ | ||
Line 243: | Line 239: | ||
}, | }, | ||
["IconList"] = { | ["IconList"] = { | ||
formatter = function(cell, tableArgs, tagArgs) | formatter = function(cell, tableArgs, tagArgs) | ||
local cellSize = 0 | local cellSize = 0 | ||
Line 322: | Line 317: | ||
["TermList"] = terms("TermList"), | ["TermList"] = terms("TermList"), | ||
["Transcript"] = { | ["Transcript"] = { | ||
formatter = function(cell, tableArgs, tagArgs) | formatter = function(cell, tableArgs, tagArgs) | ||
local text = string.gsub(cell, "%[Player Name%]", playerName()) | local text = string.gsub(cell, "%[Player Name%]", playerName()) |