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

De Adadov.net wiki
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 4 : Ligne 4 :


function p.showType()  
function p.showType()  
local title = mw.title.getCurrentTitle()
if string.match(title, "doc") then
if string.match(title, "doc") then
p.type = "doc"
p.type = "doc"

Version du 4 février 2015 à 16:27

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

Test

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

local p = {}

function p.showType() 
	local title = mw.title.getCurrentTitle()
	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