Module:Message box: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(indentation tweak) |
(require name parameter for ambox) |
||
Line 350: | Line 350: | ||
-- Add template-namespace categories. |
-- Add template-namespace categories. |
||
⚫ | |||
if cfg.templateCategory then |
if cfg.templateCategory then |
||
if |
if cfg.templateCategoryRequireName then |
||
⚫ | |||
if self.isTemplatePage then |
if self.isTemplatePage then |
||
self:addCat('template', cfg.templateCategory) |
self:addCat('template', cfg.templateCategory) |
||
Line 367: | Line 367: | ||
if not self.name and not self.title.isSubpage then |
if not self.name and not self.title.isSubpage then |
||
templateCat = templateErrorCategory |
templateCat = templateErrorCategory |
||
elseif self.isTemplatePage then |
|||
elseif type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name) then |
|||
local paramsToCheck = cfg.templateErrorParamsToCheck or {} |
local paramsToCheck = cfg.templateErrorParamsToCheck or {} |
||
local count = 0 |
local count = 0 |