Modul:Vorlage:LuaModuleDoc: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
update
wp>PerfektesChaos (+) |
wp>PerfektesChaos (update) |
||
Zeile 1: | Zeile 1: | ||
--[=[ 2013-10- | --[=[ 2013-10-23 | ||
Support {{LuaModuleDoc}} | Support {{LuaModuleDoc}} | ||
* nav() | * nav() | ||
Zeile 26: | Zeile 26: | ||
local r = false | local r = false | ||
local sub = "/" .. LuaWiki.getArg( "subTest", "Test" ) | local sub = "/" .. LuaWiki.getArg( "subTest", "Test" ) | ||
local s = | local s = string.format( "%s/%s%s", start, script, sub ) | ||
local t = mw.title.makeTitle( n, s ) | local t = mw.title.makeTitle( n, s ) | ||
if not t.exists then | if not t.exists then | ||
Zeile 32: | Zeile 32: | ||
local subLow = mw.ustring.lower( sub ) | local subLow = mw.ustring.lower( sub ) | ||
if subLow ~= sub then | if subLow ~= sub then | ||
s = | s = string.format( "%s/%s%s", start, script, subLow ) | ||
t = mw.title.makeTitle( n, s ) | t = mw.title.makeTitle( n, s ) | ||
low = t.exists | low = t.exists | ||
Zeile 38: | Zeile 38: | ||
if not low then | if not low then | ||
n = mw.site.namespaces.Module.id | n = mw.site.namespaces.Module.id | ||
s = | s = string.format( "%s/%s", script, sub ) | ||
t = mw.title.makeTitle( n, s ) | t = mw.title.makeTitle( n, s ) | ||
if not t.exists and subLow ~= sub then | if not t.exists and subLow ~= sub then | ||
Zeile 202: | Zeile 202: | ||
collect.subDoc = sub | collect.subDoc = sub | ||
collect.subModule = sub | collect.subModule = sub | ||
s = string.format( "%s/%s/%s", start, script, sub ) | |||
if currentTitle.text == s then | |||
s = string.format( "%s/%s", s, collect[ 3 ] ) | |||
t = mw.title.makeTitle( nsDocs, s ) | |||
if t.exists then | |||
super = currentTitle.text .. "/" | |||
end | |||
end | |||
end | end | ||
elseif lead and sub then | elseif lead and sub then | ||
Zeile 361: | Zeile 369: | ||
r = r or "" | r = r or "" | ||
else | else | ||
r = "<span class= | r = string.format( "<span class=\"error\">%s</span>", LuaWiki ) | ||
end | end | ||
return r | return r |