Module:GetArtikel: verschil tussen versies

Uit HisGIS
Naar navigatie springen Naar zoeken springen
 
Regel 5: Regel 5:
 
local f = frame.args -- This line allows parameters from {{#invoke:}} to be used easily. 'f' 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]
 
titel = f[1]
bron = f[2]
 
 
if titel == '' then  
 
if titel == '' then  
 
return  ''
 
return  ''
 
else  
 
else  
return  '<div style="text-align:center;font-style:italic;">' .. titel .. '</div>{{ref|' .. bron .. '}}<br />'
+
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 16: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