Module:Unsubst: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
m
10 revisions imported
m (fix whitespace removal; remove empty parameters after handling aliases and prevent removal of two or fewer consecutive empty parameters in a sequence)
m (10 revisions imported)
 
(2 intermediate revisions by 2 users not shown)
Line 9:
['$aliases'] = 'parameter aliases',
['$flags'] = 'flags',
['$B'] = 'template content',
['$template-name'] = 'template invocation name override',
}
 
Line 47 ⟶ 48:
-- Find the invocation name.
local mTemplateInvocation = require('Module:Template invocation')
local name
local name = mTemplateInvocation.name(frame:getParent():getTitle())
 
if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then
name = frame.args['$template-name'] -- override whatever the template name is with this name
else
local name = mTemplateInvocation.name(frame:getParent():getTitle())
end
 
-- Combine passed args with passed defaults
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu