Module:Category handler/config: Difference between revisions

m
(move parameter names to a cfg.parameters subtable)
m (1 revision imported from wikipedia:Module:Category_handler/config)
 
(11 intermediate revisions by 4 users not shown)
Line 13:
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. Values added --
-- here will work in addition to the default English parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- cfg.foo = 'parameter name', --
-- --
-- To add multiple names, you can use this format: --
-- --
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, --
--------------------------------------------------------------------------------
 
Line 30 ⟶ 29:
--
-- cfg.nocat:
-- Result of yesno(args[cfg.nocat]) Effect
-- true Categorisation is suppressed
-- false Categorisation is allowed, and
Line 37 ⟶ 36:
--
-- cfg.categories:
-- Result of yesno(args[cfg.categories]) Effect
-- true Categorisation is allowed, and
-- the blacklist check is skipped
Line 62 ⟶ 61:
-- The parameter name used to specify a page other than the current page;
-- used for testing and demonstration. This must be the same as the cfg.page
-- parameter in [[Module:Namespace detect]].
demopage = 'page',
}
Line 72 ⟶ 70:
-- value can be specified, like this: --
-- --
-- cfg.foo = 'value name' -- --
-- --
-- These settings are optional. It is always possible to use the module --
-- defaults instead. --
--------------------------------------------------------------------------------
 
Line 93 ⟶ 88:
--------------------------------------------------------------------------------
-- Default namespaces --
-- This is a table of namespaces to categorise by default. TheyThe shouldkeys beare the in --
-- defaultsnamespace insteadnumbers. --
-- the format of parameter names accepted by [[Module:Namespace detect]]. --
--------------------------------------------------------------------------------
 
cfg.defaultNamespaces = {
[ 0] = true, -- main
'main',
[ 6] = true, -- file
'file',
[ 12] = true, -- help
'help',
'[ 14] = true, -- category'
[100] = true, -- portal
[108] = true, -- book
}
 
--------------------------------------------------------------------------------
-- Wrappers --
-- This is a wrapper template or a list of wrapper templates to be passed to --
-- [[Module:Arguments]]. --
--------------------------------------------------------------------------------
 
cfg.wrappers = 'Template:Category handler'
 
--------------------------------------------------------------------------------