Module:GetArtikel: verschil tussen versies

Uit HisGIS
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met 'local p = {} -- Use unexplained code as is. function maakTitel(titel, bron) -- One can define custom functions for use. Here we define a function 'lucky' that has...')
 
Geen bewerkingssamenvatting
 
(10 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 1: Regel 1:
local p = {} -- Use unexplained code as is.
local p = {} -- Use unexplained code as is.


function maakTitel(titel, bron) -- One can define custom functions for use. Here we define a function 'lucky' that has two inputs a and b. The names are of your choice.
function p.maakTitel(frame)
local pf = frame:getParent().args -- This line allows template parameters to be used in this code easily. The equal sign is used to define variables. 'pf' can be replaced with a word of your choice.
local f = frame.args -- This line allows parameters from {{#invoke:}} to be used easily. 'f' can be replaced with a word of your choice.
titel = f[1]
if titel == '' then  
if titel == '' then  
return '<span style="text-align:center;font-style:italic;">' + titel + "</span><ref>" + bron + "</ref>"
return ''
else  
else  
return ''
return '<div style="text-align:center;font-style:italic;">' .. titel .. '</div><br />'
end
end
end
end


return p
return p

Huidige versie van 25 aug 2020 om 15:38

Documentatie voor deze module kan aangemaakt worden op de volgende pagina: Module:GetArtikel/doc

local p = {} -- Use unexplained code as is.

function p.maakTitel(frame)
	local pf = frame:getParent().args -- This line allows template parameters to be used in this code easily. The equal sign is used to define variables. 'pf' can be replaced with a word of your choice.
	local f = frame.args -- This line allows parameters from {{#invoke:}} to be used easily. 'f' can be replaced with a word of your choice.
	titel = f[1]
	if titel == '' then 
		return  ''
	else 
		return  '<div style="text-align:center;font-style:italic;">' .. titel .. '</div><br />'
	end
end

return p