15.082
Bearbeitungen
(+ isTrue()) |
(+ pagename() / subpagename()) Markierung: Zurückgesetzt |
||
| Zeile 1: | Zeile 1: | ||
local p = {} | local p = {} | ||
local str = require("Modul:String") | |||
function p.AttributeTable(args) | function p.AttributeTable(args) | ||
| Zeile 216: | Zeile 217: | ||
function p.fullpagename() | function p.fullpagename() | ||
return tostring(mw.title.getCurrentTitle()) | return tostring(mw.title.getCurrentTitle()) | ||
end | |||
function p.pagename() | |||
local fullpagename = p.fullpagename() | |||
local split = str.split2(fullpagename, ":") | |||
return split[#split] -- letztes Element in der table | |||
end | |||
function p.subpagename() | |||
local pagename = p.pagename() | |||
local split = str.split2(pagename, "/") | |||
return split[#split] -- letztes Element in der table | |||
end | end | ||