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

De Adadov.net wiki
Aucun résumé des modifications
Aucun résumé des modifications
 
(5 versions intermédiaires par le même utilisateur non affichées)
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 = {}


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


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


return p
return p

Dernière version du 4 février 2015 à 16:33

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

Test

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

local p = {}

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

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

return p