Changes
try and keep the line length down a bit
.wikitext(p.protectionTemplate())
.wikitext(p.sandboxNotice(args))
-- This div tag is from {{documentation/start box}}, but moving it here -- so that we don't have to worry about unclosed tags.
.tag('div')
.attr('id', 'template-documentation')
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, 'edit')
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, 'history')
text = text .. 'The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from ' .. docLink .. '. ' .. makeToolbar(editLink, historyLink) .. '<br />'
elseif subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local printTitle = mw.title.new(printPage)
if printTitle.exists then
text = text .. '<br />A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at ' .. makeWikilink(printPage, '/Print') .. '.' .. 'If you make a change to this template, please update the print version as well.' .. '[[Category:Templates with print versions]]'
end
end