Module:Template test case/config: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(set showcode = true in the main module rather than here, as if people go to the trouble of passing in a nowiki invocation, it's pretty much a given that they want it to be displayed) |
(tweak the wrappers table format and add a couple more config values) |
||
Line 1: | Line 1: | ||
-- This module holds configuration data for [[Module:Template test |
-- This module holds configuration data for [[Module:Template test case]]. |
||
return { |
return { |
||
-- The magic word used in place of the template name when making nowiki |
|||
-- invocations. |
|||
templateNameMagicWord = '__TEMPLATENAME__', |
|||
-- The subpage that sandboxes are typically stored on. Used when loading |
|||
-- wrapper template config so that wrapper template sandboxes load the same |
|||
-- config as wrapper templates. |
|||
sandboxSubpage = 'sandbox', |
|||
-- Wrapper template config. |
|||
-- This is a table with wrapper template names as keys, and subtables |
|||
-- containing two fields: |
|||
-- func - the function name to be used with that template. This must be a |
|||
-- function exported by the main module. This is optional: the default |
|||
-- value is "table". |
|||
-- args - a table of default arguments to be used with that template. This is |
|||
-- is optional. |
|||
wrappers = { |
wrappers = { |
||
['Template:Test case'] = { |
['Template:Test case'] = {}, |
||
func = 'table' |
|||
}, |
|||
['Template:Testcase table'] = { |
['Template:Testcase table'] = { |
||
args = {_format = 'columns'} |
|||
options = {format = 'columns'} |
|||
}, |
}, |
||
['Template:Testcase rows'] = { |
['Template:Testcase rows'] = { |
||
args = {_format = 'rows'} |
|||
options = {format = 'rows'} |
|||
}, |
}, |
||
['Template:Test case nowiki'] = { |
['Template:Test case nowiki'] = { |
Revision as of 15:08, 27 November 2014
Documentation for this module may be created at Module:Template test case/config/doc
-- This module holds configuration data for [[Module:Template test case]].
return {
-- The magic word used in place of the template name when making nowiki
-- invocations.
templateNameMagicWord = '__TEMPLATENAME__',
-- The subpage that sandboxes are typically stored on. Used when loading
-- wrapper template config so that wrapper template sandboxes load the same
-- config as wrapper templates.
sandboxSubpage = 'sandbox',
-- Wrapper template config.
-- This is a table with wrapper template names as keys, and subtables
-- containing two fields:
-- func - the function name to be used with that template. This must be a
-- function exported by the main module. This is optional: the default
-- value is "table".
-- args - a table of default arguments to be used with that template. This is
-- is optional.
wrappers = {
['Template:Test case'] = {},
['Template:Testcase table'] = {
args = {_format = 'columns'}
},
['Template:Testcase rows'] = {
args = {_format = 'rows'}
},
['Template:Test case nowiki'] = {
func = 'nowiki'
}
}
}