Geen bewerkingssamenvatting
Geen bewerkingssamenvatting
Regel 9: Regel 9:
local titelGew = mSlot.getValueFromTemplateData( "ws-page-props", titelid, "Title", "TitelGew" )
local titelGew = mSlot.getValueFromTemplateData( "ws-page-props", titelid, "Title", "TitelGew" )
local titelBiblio = mSlot.getValueFromTemplateData( "ws-page-props", titelid, "Title", "TitelBiblio" )
local titelBiblio = mSlot.getValueFromTemplateData( "ws-page-props", titelid, "Title", "TitelBiblio" )
local sortTitle = mFormat.flatten( titelBiblio )
if titelGew == nil then return "" end
local sortTitle = mFormat.flatten( titelBiblio or titelGew )
-- {{uc:{{#sub:{{#var:@sort title}}|0|1}}}}
local initial = mw.ustring.upper( mw.ustring.sub( sortTitle, 1, 1 ) )


local set = {
local set = {
Regel 16: Regel 20:
["Has sort label"] = sortTitle .. "¶",
["Has sort label"] = sortTitle .. "¶",
["Has sort label by author"] = "", -- {{#show:{{{TitelID|}}}|?Has sort label by author=|link=none}}
["Has sort label by author"] = "", -- {{#show:{{{TitelID|}}}|?Has sort label by author=|link=none}}
["Has initial"] = "", -- {{uc:{{#sub:{{#var:@sort title}}|0|1}}}}
["Has initial"] = initial,
["Has publication year"] = ""
["Has publication year"] = "" -- {{#show:{{{TijdschriftNr|}}}|?Has publication year}}
}
}



Versie van 23 okt 2025 18:30

Module:Class/Periodical contribution




{{#invoke:Class/Periodical contribution|set
|titelid=
|tijdschriftnr=
}}


debugmode

De zwarte dood (titelGew)


local p = {}
local mSlot = require("Module:Slot")
local mFormat= require("Module:Format for sorting")

p.set = function(frame)
	-- pagename of title
	local titelid = frame.args.titelid or ""
	-- s[Title][TitelGew]
	local titelGew = mSlot.getValueFromTemplateData( "ws-page-props", titelid, "Title", "TitelGew" )
	local titelBiblio = mSlot.getValueFromTemplateData( "ws-page-props", titelid, "Title", "TitelBiblio" )
	if titelGew == nil then return "" end
	
	local sortTitle = mFormat.flatten( titelBiblio or titelGew )
	-- {{uc:{{#sub:{{#var:@sort title}}|0|1}}}}
	local initial = mw.ustring.upper( mw.ustring.sub( sortTitle, 1, 1 ) )

	local set = {
		["Title"] = titelGew,
		["Title plain"] = titelGew,
		["Has sort label"] = sortTitle .. "¶",
		["Has sort label by author"] = "", -- {{#show:{{{TitelID|}}}|?Has sort label by author=|link=none}}
		["Has initial"] = initial,
		["Has publication year"] = "" -- {{#show:{{{TijdschriftNr|}}}|?Has publication year}}
	}

	--mw.ext.displaytitle.set( titelGew )
	return titelGew .. " (titelGew)"

end

return p