Modul:Uses TemplateStyles: Unterschied zwischen den Versionen

Stop inventing you're own naming convention break; "/sandbox" should be the last part of a sandbox's name, not the middle part
(display sandbox links, if a sandbox version exists)
(Stop inventing you're own naming convention break; "/sandbox" should be the last part of a sandbox's name, not the middle part)
Zeile 36: Zeile 36:
local tsTitle = mw.title.new(ts)
local tsTitle = mw.title.new(ts)
if tsTitle then
if tsTitle then
local tsSandboxTitle = mw.title.new(string.format('%s:%s/sandbox/%s', tsTitle.nsText, tsTitle.baseText, tsTitle.subpageText))
local tsSandboxTitle = mw.title.new(ts + "/sandbox")
if tsSandboxTitle and tsSandboxTitle.exists then
if tsSandboxTitle and tsSandboxTitle.exists then
sandboxLink = string.format(' ([[:%s|sandbox]])', tsSandboxTitle.prefixedText)
sandboxLink = string.format(' ([[:%s|sandbox]])', tsSandboxTitle.prefixedText)
Anonymer Benutzer