Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Message box: Difference between revisions

Content added Content deleted
(indentation tweak)
(require name parameter for ambox)
Line 350: Line 350:


-- Add template-namespace categories.
-- Add template-namespace categories.
self.isTemplatePage = type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name)
if cfg.templateCategory then
if cfg.templateCategory then
if self.name then
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 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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.