Changes

Jump to: navigation, search

Module:Documentation

349 bytes added, 01:08, 28 December 2013
internationalise the sandbox template notice call
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
function p.sandboxNotice(args)
if currentTitle.subpageText =local sandboxNoticeTemplate = cfg.sandboxSubpage thensandboxNoticeTemplate local frame = mw.getCurrentFrame if not () local root = htmlBuildersandboxNoticeTemplate and currentTitle.create() root .tag('div') .css('clear', 'both') .done() .wikitext(frame:expandTemplate{title subpageText = 'template sandbox notice', args = {args[cfg.livepageArg]}}sandboxSubpage) return tostring(root) elsethen
return nil
end
local frame = mw.getCurrentFrame()
local notice = htmlBuilder.create()
notice
.tag('div')
.css('clear', 'both')
.done()
.wikitext(frame:expandTemplate{title = sandboxNoticeTemplate, args = {[cfg.sandboxNoticeLivepageParam] = args[cfg.livepageArg]}})
return tostring(notice)
end
Anonymous user

Navigation menu