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)
-- (1) properties derived from TitelID
-- 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
}
-- (2) properties derived from TijdschriftNr
local tijdschriftnr = frame.args.tijdschriftnr or nil
if tijdschriftnr ~= nil then
-- {{#show:{{{TijdschriftNr|}}}|?Has publication year}}
set["Has publication year"] = mSlot.getValueFromTemplateData( "ws-page-props", tijdschriftnr, "Periodical issue", "Jaar" )
end
--mw.ext.displaytitle.set( titelGew )
return titelGew .. " (titelGew)"
end
return p
