יחידה:Awards

גרסה מ־23:48, 29 בספטמבר 2025 מאת מ. רובין (שיחה | תרומות) (יצירת דף עם התוכן "local p = {} local propertyLink = require('Module:PropertyLink') local prizeCount=0 function counter(v) prizeCount=#v return v end function p.getPrizes(frame) local options = { ['entity-gender-aware'] = true, ['qualifiers'] = { 'P585' }, ['allowMulti'] = true, ['filter'] = counter, ['seperator'] = '*' } local entityId = frame:getParent().args['qid'] or mw.wikibase.getEntityIdForCurrentPage() local res = propertyLink.getPropertyByOptions...")
(הבדל) → הגרסה הקודמת | הגרסה האחרונה (הבדל) | הגרסה הבאה ← (הבדל)

ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:Awards/תיעוד

local p = {}
local propertyLink = require('Module:PropertyLink')

local prizeCount=0
function counter(v)
	prizeCount=#v
	return v
end

function p.getPrizes(frame)
	local options = {
		['entity-gender-aware'] =  true,
		['qualifiers'] = { 'P585' },
		['allowMulti'] = true,
		['filter'] = counter,
		['seperator'] = '*'
	}
	
	local entityId = frame:getParent().args['qid'] or mw.wikibase.getEntityIdForCurrentPage()
	local res = propertyLink.getPropertyByOptions('P166', entityId, options)
	if prizeCount > 11 then
		res = frame:expandTemplate{ title = 'טורים', args = { ['תוכן'] = res } }
	end
	return res
end

return p