« Module:Essai » : différence entre les versions

De Adadov.net wiki
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
local documentation = require('Module:Documentation').main
local documentation = require('Module:Documentation').main
local title = tostring(mw.title.getCurrentTitle())


local p = {}
local p = {}


p.type = ""
function showType()
if string.match(title, "doc") then
p.type = "doc"
else
p.type = "std"
end
end


if string.match(title, "doc") then
function showTitle()
p.type = "doc"
print(tostring(mw.title.getCurrentTitle()))
else
p.type = "std"
end
end
p.title = title


return p
return p

Version du 4 février 2015 à 16:24

Documentation icon Documentation Module[voir] [éditer] [historique] [purger]

Test

local documentation = require('Module:Documentation').main

local p = {}

function showType() 
	if string.match(title, "doc") then
		p.type = "doc"
	else
		p.type = "std"
	end
end

function showTitle()
	print(tostring(mw.title.getCurrentTitle()))
end

return p