Module:Documentation: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(fix for the module mirror link. Previously, it loaded Template:Documentation/mirror, which Lua complained Script error: Lua error at line 1: unexpected symbol near '{'. also rm redundant testcasesTitle test (see talk page for further details)) |
(remove REVISIONID - see Special:PermaLink/725652098#Preview-only template warnings using REVISIONID magic word) |
||
Line 355: | Line 355: | ||
-- "This is the template sandbox for [[Template:Foo]] (diff)." |
-- "This is the template sandbox for [[Template:Foo]] (diff)." |
||
local text = '' |
local text = '' |
||
local frame = mw.getCurrentFrame() |
|||
local isPreviewing = frame:preprocess('{{REVISIONID}}') == '' -- True if the page is being previewed. |
|||
local pagetype |
local pagetype |
||
if subjectSpace == 10 then |
if subjectSpace == 10 then |
||
Line 367: | Line 365: | ||
local templateLink = makeWikilink(templateTitle.prefixedText) |
local templateLink = makeWikilink(templateTitle.prefixedText) |
||
local compareUrl = env.compareUrl |
local compareUrl = env.compareUrl |
||
if |
if compareUrl then |
||
⚫ | |||
⚫ | |||
local compareDisplay = message('sandbox-notice-compare-link-display') |
local compareDisplay = message('sandbox-notice-compare-link-display') |
||
local compareLink = makeUrlLink(compareUrl, compareDisplay) |
local compareLink = makeUrlLink(compareUrl, compareDisplay) |
||
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) |
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) |
||
⚫ | |||
⚫ | |||
end |
end |
||
-- Get the test cases page blurb if the page exists. This is something like |
-- Get the test cases page blurb if the page exists. This is something like |