Module:MovementTabs: Difference between revisionsGive feedback
created |
No edit summary |
||
| Line 8: | Line 8: | ||
local tabs = mw.text.split(tabsStr, "%s*,%s*") | local tabs = mw.text.split(tabsStr, "%s*,%s*") | ||
local current = mw.title.getCurrentTitle().fullText | local current = mw.title.getCurrentTitle().fullText | ||
local baseRoot = root | |||
local baseRoot | |||
if root then | |||
baseRoot = root | |||
else | |||
local fullTitle = mw.title.getCurrentTitle().fullText | |||
local segments = mw.text.split(fullTitle, "/") | |||
if #segments > 1 then | |||
table.remove(segments) | |||
baseRoot = table.concat(segments, "/") | |||
else | |||
baseRoot = fullTitle | |||
end | |||
end | |||
local html = mw.html.create("div") | local html = mw.html.create("div") | ||