Content added Content deleted
(more il8n work) |
(internationalise the sandbox template notice call) |
||
Line 29:
cfg.mainDivClasses = 'template-documentation iezoomfix' -- The CSS classes added to the main HTML "div" tag.
cfg.sandboxSubpage = 'sandbox' -- The name of the template subpage typically used for sandboxes.
cfg.sandboxNoticeTemplate = 'template sandbox notice' -- The name of the template to display at the top of sandbox pages.
cfg.sandboxNoticeLivepageParam = 1 -- The parameter of the sandbox notice template to send the cfg.livepageArg to.
-- Display settings
Line 131 ⟶ 133:
function p.sandboxNotice(args)
local sandboxNoticeTemplate = cfg.sandboxNoticeTemplate
if not (sandboxNoticeTemplate and currentTitle.subpageText == cfg.sandboxSubpage) then
local frame = mw.getCurrentFrame()▼
local root = htmlBuilder.create()▼
.tag('div')▼
.css('clear', 'both')▼
.done()▼
.wikitext(frame:expandTemplate{title = 'template sandbox notice', args = {args[cfg.livepageArg]}})▼
return tostring(root)▼
return nil
end
notice
▲
end
|