Content deleted Content added
try removing class and importance from bubbles Tag: Reverted |
read parent arguments for demo_page Tag: Reverted |
||
Line 699:
end
local parameter_check = function(frame, banner_name, project_name, args)
---------------------------
-- Unknown parameters -----
---------------------------
local parent_args = args_module.getArgs(frame, {parentOnly = true})▼
local template_code = banner_name:getContent()
local parameters = {}
Line 712 ⟶ 711:
local unknown_category = cfg.unknown_parameters.tracking:format(project_name)
parameters.unknown = mw.title.new(unknown_category).exists and '[[' .. unknown_category .. '|_VALUE_]]' or ''
return require('Module:Check for unknown parameters')._check(parameters,
end
local initialise = function(args, raw_args, inactive)
▲ local parent_args = args_module.getArgs(frame, {parentOnly = true})
local demo_page = parent_args.demo_page
local project_name = args.PROJECT_NAME or 'WikiProject ' .. (args.PROJECT or 'PROJECT')
local banner_name = mw.title.new(args.BANNER_NAME or 'Template:WikiProject ' .. (args.PROJECT or 'PROJECT'))
local demo = not yesno(args.category or true, true) or
local on_template_page = not demo and current_title.rootPageTitle==banner_name.rootPageTitle
local unknown_parameters = banner_name.exists and not demo and parameter_check(frame, banner_name, project_name) or ''▼
if on_template_page then
local templatepage = require('Module:WikiProject banner/templatepage' .. (sandbox or '')).templatepage
return templatepage(args, raw_args, inactive)
else
local unknown_parameters = banner_name.exists
and not demo
▲
return unknown_parameters .. p._main(args, raw_args, demo or inactive, banner_name), nil -- nil to disregard subsequent returned values
end
|