Module:GetArtikel: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
| Regel 1: | Regel 1: | ||
local p = {} -- Use unexplained code as is. | local p = {} -- Use unexplained code as is. | ||
function p.maakTitel(titel | 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] | |||
bron = f[2] | |||
if titel == '' then | if titel == '' then | ||
return '' | return '' | ||
Versie van 3 jul 2018 14:40
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]
bron = f[2]
if titel == '' then
return ''
else
return '<span style="text-align:center;font-style:italic;">' .. titel .. '</span><ref>' .. bron .. '</ref>'
end
end
return p