Module:Category handler: Difference between revisions

Content added Content deleted
(add the rest of the features, improve the comments)
(pass through page parameter to Module:Namespace detect, tweak comments a bit)
Line 62: Line 62:


-- The categorisation blacklist. Pages that match Lua patterns in this
-- The categorisation blacklist. Pages that match Lua patterns in this
-- list will not be categorised unless the appropriate options are set.
-- list will not be categorised unless any of the following options are
-- set: "nocat=false", "categories=yes", or "category2=yes".
-- If the namespace name has a space in, it must be written with an
-- If the namespace name has a space in, it must be written with an
-- underscore, e.g. "Wikipedia_talk". Other parts of the title can have
-- underscore, e.g. "Wikipedia_talk". Other parts of the title can have
Line 185: Line 186:
-- [[Module:Namespace detect]], to save us from having to rewrite the
-- [[Module:Namespace detect]], to save us from having to rewrite the
-- code.
-- code.
local pageObject = NamespaceDetect.getPageObject()
local pageObject = NamespaceDetect.getPageObject( args[cfg.page] )
local mappings = NamespaceDetect.getParamMappings()
local mappings = NamespaceDetect.getParamMappings()