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

De Adadov.net wiki
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 3 : Ligne 3 :
local p = {}
local p = {}


function showType()  
function p.showType()  
if string.match(title, "doc") then
if string.match(title, "doc") then
p.type = "doc"
p.type = "doc"
Ligne 11 : Ligne 11 :
end
end


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


return p
return p

Version du 4 février 2015 à 16:25

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

Test

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

local p = {}

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

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

return p