Module:GetArtikel: verschil tussen versies

Uit HisGIS
Naar navigatie springen Naar zoeken springen
Geen bewerkingssamenvatting
Geen bewerkingssamenvatting
 
(6 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 p.maakTitel(titel, bron)
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  'leeg'
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