271
回編集
mediawiki>えのきだたもつ 細 (「モジュール:Unsubst」を保護しました: 影響が特に大きいテンプレート ([編集=拡張承認された利用者と管理者に許可] (無期限) [移動=拡張承認された利用者と管理者に許可] (無期限))) |
細 (1版 をインポートしました) |
||
9行目: | 9行目: | ||
['$aliases'] = 'parameter aliases', | ['$aliases'] = 'parameter aliases', | ||
['$flags'] = 'flags', | ['$flags'] = 'flags', | ||
['$B'] = 'template content' | ['$B'] = 'template content', | ||
['$template-name'] = 'template invocation name override', | |||
} | } | ||
47行目: | 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 | ||
58行目: | 65行目: | ||
if not specialParams[k] then | if not specialParams[k] then | ||
if v == '__DATE__' then | if v == '__DATE__' then | ||
v = mw.getContentLanguage():formatDate( ' | v = mw.getContentLanguage():formatDate( 'F Y' ) | ||
end | end | ||
args[k] = v | args[k] = v | ||
67行目: | 74行目: | ||
if not specialParams[k] then | if not specialParams[k] then | ||
if v == '__DATE__' then | if v == '__DATE__' then | ||
v = mw.getContentLanguage():formatDate( ' | v = mw.getContentLanguage():formatDate( 'F Y' ) | ||
end | end | ||
args[k] = v | args[k] = v |