Module:Message box: Difference between revisions
Jump to navigation
Jump to search
m>Mr. Stradivarius indentation tweak |
m>Mr. Stradivarius 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 self.name | if cfg.templateCategoryRequireName then | ||
self.isTemplatePage = type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name) | |||
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 | elseif self.isTemplatePage then | ||
local paramsToCheck = cfg.templateErrorParamsToCheck or {} | local paramsToCheck = cfg.templateErrorParamsToCheck or {} | ||
local count = 0 | local count = 0 |