Modul:Unsubst: Perbedaan antara revisi

260 bita ditambahkan ,  4 tahun yang lalu
sync from sandbox; see talk;
dw>Argo Carpathians
k (Melindungi "Modul:Unsubst": 6. Templat berisiko tinggi ([Sunting=Hanya untuk pengurus] (selamanya) [Pindahkan=Hanya untuk pengurus] (selamanya)))
 
dw>Trappist the monk
(sync from sandbox; see talk;)
Baris 6: Baris 6:


local specialParams = {
local specialParams = {
['$params'] = 'daftar parameter',
['$params'] = 'parameter list',
['$aliases'] = 'alias parameter',
['$aliases'] = 'parameter aliases',
['$flags'] = 'bendera',
['$flags'] = 'flags',
['$B'] = 'konten templat'
['$B'] = 'template content',
['$template-name'] = 'template invocation name override',
}
}


Baris 47: Baris 48:
-- Find the invocation name.
-- Find the invocation name.
local mTemplateInvocation = require('Module:Template invocation')
local mTemplateInvocation = require('Module:Template invocation')
local name = mTemplateInvocation.name(frame:getParent():getTitle())
local name
 
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
name = mTemplateInvocation.name(frame:getParent():getTitle())
end


-- Combine passed args with passed defaults
-- Combine passed args with passed defaults
Pengguna anonim