Modul:Vorlage:Dokumentation: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
2019-07-29
(2019-05-17) |
(2019-07-29) |
||
Zeile 1: | Zeile 1: | ||
--[=[ 2019- | --[=[ 2019-07-29 | ||
{{Dokumentation}} | {{Dokumentation}} | ||
]=] | ]=] | ||
Zeile 170: | Zeile 170: | ||
function p.hastemplate( frame ) | function p.hastemplate( frame ) | ||
r = Current.text:gsub( "/Doku$", "" ) | -- OBSOLETING | ||
local r = Current.text:gsub( "/Doku$", "" ) | |||
:gsub( " ", "_" ) | |||
:gsub( "\"", """ ) | |||
if Current.namespace ~= 10 then | if Current.namespace ~= 10 then | ||
r = string.format( "%s:%s", | r = string.format( "%s:%s", | ||
Zeile 180: | Zeile 181: | ||
return string.format( "hastemplate:%s+", r ) | return string.format( "hastemplate:%s+", r ) | ||
end -- p.hastemplate() | end -- p.hastemplate() | ||
function p.transcludes() | |||
local s = Current.text:gsub( "/Doku$", "" ) | |||
:gsub( " ", "_" ) | |||
:gsub( "\"", """ ) | |||
local t = mw.title.new( "Suche", -1 ) | |||
if Current.namespace ~= 10 then | |||
s = string.format( "%s:%s", | |||
mw.site.namespaces[ Current.namespace ].name, | |||
s ) | |||
end | |||
s = string.format( "hastemplate:%s ", s ) | |||
return t:fullUrl( { search = s } ) | |||
end -- p.transcludes() | |||