Modul:Vorlage:Dokumentation: Unterschied zwischen den Versionen

K
4 Versionen importiert: Extension Graph
(2019-05-16)
K (4 Versionen importiert: Extension Graph)
 
(2 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
--[=[ 2019-05-16
--[=[ 2019-07-29
{{Dokumentation}}
{{Dokumentation}}
]=]
]=]
Zeile 170: Zeile 170:


function p.hastemplate( frame )
function p.hastemplate( frame )
     r = Current.text:gsub( "/Doku$", "" )
     -- OBSOLETING
                    :gsub( " ", "_" )
    local r = Current.text:gsub( "/Doku$", "" )
                    :gsub( "\"", """ )
                          :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()